Symbol::Extract - Remove a symbol from the symbol table and place it's ref into a variable.
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.
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 );
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.
$SYMBOL
$PACKAGE
$REF must be a scalar ref, a reference to the symbol will be put into the reference.
$REF
Symbol::Alias Allows you to set up aliases within a package at compile-time.
Symbol::Delete Allows you to remove symbols from a package at compile time.
Symbol::Move allows you to rename or relocate symbols at compile time.
Symbol::Methods introduces several package methods for managing symbols.
The source code repository for symbol can be found at http://github.com/exodist/Symbol-Move.
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/
To install Symbol::Move, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Symbol::Move
CPAN shell
perl -MCPAN -e shell install Symbol::Move
For more information on module installation, please visit the detailed CPAN module installation guide.