NAME

package - makes an alias of the current package

SYNOPSIS

package ThisPAckage;

sub new { }

use package "Alias", qw'new', { alias => 'new' };
ThisPAckage->package::import("Time::HiRes", 'time'};

my $ref = &Alias::new;
my $obj = Alias->alias;

or

package main;

Alias->package::base('Original');

my $alias = new Alias();
$alias->sub_from_original;

DESCRIPTION

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

METHODS

base($alias, $original, ...)

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

package::base($alias, $original, qw'$var $foo basename');

package::base($alias, $original, [{'@as' => '@it', '@like' => '@it'}, qw'sub function'], 'routine', ['ggg'];

import($to, $from, ...)

imports the symbols from $from to $to

Foo->package::import('from', {'foo' => 'new'} );

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.