[Israel.pm] package aliasing?

Adriano Ferreira a.r.ferreira at gmail.com
Wed Jan 31 10:49:55 PST 2007


On 1/31/07, Shmuel Fomberg <semuelf at 012.net.il> wrote:
> Can I make one package an alias of another?
> I want that all the variables and subs called through package A will be
> actually answered by package B.
> Something like: *A:: = *B::
> Can I?

It is more like this:

*A:: = \*B::

or you can use CPAN modules like Package::Alias:

use Package::Alias A => 'B';

There are others, but I cannot find them right now.

Adriano Ferreira.



More information about the Perl mailing list