package - makes an alias of the current package
package ThisPAckage; sub new { } use package "Alias", qw'new', { alias => 'new' }; my $ref = &Alias::new; my $obj = Alias->alias; or package main; package::alias('Alias', 'Original'); my $alias = new Alias(); $alias->sub_from_original;
use package makes an alias of the current package and establishs IS-A relationship with current package and alias at compile time
use package makes as alias of the original and imports the symbols in import in the namespace of alias
package::alias($alias, $original, qw'$var $foo basename'); package::alias($alias, $original, {'@as => '@it', '@like => '@it'}, qw'sub routine');
Holger Seelig holger.seelig@yahoo.de
This is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install package, copy and paste the appropriate command in to your terminal.
cpanm
cpanm package
CPAN shell
perl -MCPAN -e shell install package
For more information on module installation, please visit the detailed CPAN module installation guide.