NAME

symbol - Symbol manipulation methods for packages.

DESCRIPTION

This package introduces several subs that can be called as methods on packages. These subs allow you to modify symbol tables. This module does not do anything that can't be done with Package::Stash, or other tools. What this module does give you is a package method interface.

SYNOPSYS

use symbol;

# Move a symbol, the old name will be removed
Foo::Bar->symbol::move('&foo' => '&bar');

# Alias a symbol, both names will work
Foo::Bar->symbol::alias('&foo' => '&bar');

# Get a reference to the symbol
my $ref = Foo::Bar->symbol::fetch('%foo');

# Delete a symbol (and return the reference that was removed)
my $ref = Foo::Bar->symbol::delete('&foo');

# Check if a symbol exists.
if(Foo::Bar->symbol::exists('&foo')) {
    ...
}

METHODS

These methods all exist in the symbol:: namespace. These can always be called as methods on any package thanks to the way perl resolves methods.

SEE ALSO

SOURCE

The source code repository for symbol can be found at http://github.com/exodist/symbol.

MAINTAINERS

AUTHORS

COPYRIGHT

Copyright 2015 Chad Granum <exodist7@gmail.com>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://dev.perl.org/licenses/