Try this,
#!/usr/bin/perl -w
use strict;
package Foo; sub boo { print "Foo!\n" }
package Bob; sub boo { print "Bob!\n" }
package main;
Foo->boo();
*Bob:: = *Foo::;
Bob->boo();
mythix:~/perl/language$ ./firstof.pl
Foo!
Foo!
mythix:~/perl/language$
Paul
On Sun, Nov 12, 2000 at 07:23:51PM +0000, Mark Fowler wrote:
> I was wondering if anyone knows any way to alias whole packages to one
> another.
>
> Basically, I want to be able to do
>
> use Foo;
> # do something magic making Bob the same as Foo.
> Bob->new("title")
>
> and also things like $Bob::var_in_Foo_namespace = 1;
>
> The reason I want to do this is for this module which is still under
> development:
>
> http://2shortplanks.com/firstof/firstof.html
> http://2shortplanks.com/firstof/firstof.pm
>
> Which is Yet Another Module Inspired By Conversations After Too Much Beer
> In The Pendrals Oak.
>
> Later.
>
> Mark.
>
> --
> print "\n",map{my$a="\n"if(length$_>6);' 'x(36-length($_)/2)."$_\n$a"} (
> Name => 'Mark Fowler', Title => 'Technology Developer' ,
> Firm => 'Profero Ltd', Web => 'http://www.profero.com/' ,
> Email => '[EMAIL PROTECTED]', Phone => '+44 (0) 20 7700 9960' )
>
>
>
>
>
>