NAME

Symbol::Extract - Remove a symbol from the symbol table and place it's ref into a variable.

DESCRIPTION

This package allows you to remove symbols from the symbol table at compile time, placing them into variables. The symbol can be in the current package or any arbitrary packages.

SYNOPSYS

my ($foo, $bar);
use Symbol::Extract(
    foo       => \$foo,    # Remove the 'foo' sub from the current package, putting the ref into $foo
    A::B::bar => \$bar,    # Remove the 'bar' sub from the A::B package, putting the ref into $bar
);

USAGE

use Symbol::Extract $SYMBOL => $REF;

$SYMBOL must be a string identifying the symbol. The symbol string must include the sigil unless it is a subroutine. You can provide a fully qualified symbol name, or it will be assumed the symbol is in $PACKAGE.

$REF must be a scalar ref, a reference to the symbol will be put into the reference.

SEE ALSO

Symbol::Alias

Symbol::Alias Allows you to set up aliases within a package at compile-time.

Symbol::Delete

Symbol::Delete Allows you to remove symbols from a package at compile time.

Symbol::Move

Symbol::Move allows you to rename or relocate symbols at compile time.

Symbol::Methods

Symbol::Methods introduces several package methods for managing symbols.

SOURCE

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

MAINTAINERS

Chad Granum <exodist@cpan.org>

AUTHORS

Chad Granum <exodist@cpan.org>

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/