NAME

package - makes an alias of the current package

SYNOPSIS

package ThisPAckage;

sub mysub { 1 };
sub as { 0 };

use package "asNewName", qw'mysub as';

&asNewName::mysub;
&asNewName::as;

or

package main;

my $original = __PACKAGE__;
my $alias = "MyPackage";
package::use($original, $alias);

$alias->mysub;
$alias->as;

MyPackage->mysub;
MyPackage->as;

DESCRIPTION

use package makes an alias of the current package and establishs IS-A relationship with current package and alias at compile time

METHODS

use($original, $alias, @import)

use package makes as alias of the original and imports the symbols in import in the namespace of alias

package::use($original, $alias, qw'importnames basename dirname');

AUTHOR

Holger Seelig holger.seelig@yahoo.de

COPYRIGHT

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