Symbol-Move

 view release on metacpan or  search on metacpan

lib/Symbol/Methods.pm  view on Meta::CPAN


=item $PACKAGE->symbol::move($SYMBOL, $NEW_NAME)

=item $PACKAGE->symbol::alias($SYMBOL, $NEW_NAME)

These will grab the symbol specified by C<$SYMBOL> and make it available under
the name in C<$NEW_NAME>. C<alias()> will leave the symbol available under both
names, C<move()> will remove it from the original name.

C<$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 C<$PACKAGE>.

C<$NEW_NAME> must be a string identifying the symbol. The string may include a
symbol, or the sigil from the C<$SYMBOL> string will be used. The string can be
a fully qualified symbol name, or it will be assumed that the new name is in
C<$PACKAGE>.

=item $ref = $PACKAGE->symbol::fetch($SYMBOL)

=item $ref = $PACKAGE->symbol::delete($SYMBOL)

These will both find the specified symbol and return a reference to it.
C<fetch()> will simply return the reference, C<delete()> will remove the symbol
before returning the reference.

C<$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 C<$PACKAGE>.

=item $bool = $PACKAGE->symbol::exists($SYMBOL)

This will check if the specified symbol exists. If the symbol exists a true
value is returned. If the symbol does not exist a false value is returned.

C<$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 C<$PACKAGE>.

=back

=head1 SEE ALSO

=over 4

=item Symbol::Alias

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

=item Symbol::Delete

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

=item Symbol::Extract

L<Symbol::Extract> Allows you to extract symbols from packages and into
variables at compile time.

=item Symbol::Move

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

=back

=head1 SOURCE

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

=head1 MAINTAINERS

=over 4

=item Chad Granum E<lt>exodist@cpan.orgE<gt>

=back

=head1 AUTHORS

=over 4

=item Chad Granum E<lt>exodist@cpan.orgE<gt>

=back

=head1 COPYRIGHT

Copyright 2015 Chad Granum E<lt>exodist7@gmail.comE<gt>.

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

See F<http://dev.perl.org/licenses/>

=cut



( run in 0.768 second using v1.01-cache-2.11-cpan-5511b514fd6 )