in reply to Module Naming Dilemma
Here's a sample:*Bar:: = \*Foo:: ;
Output:package Foo ; sub new { bless {} } sub test { print "TEST> [@_]\n" ; } package main ; *Bar:: = \*Foo:: ; my $foo = Foo->new() ; $foo->test(123) ; print "$foo\n" ; my $bar = Bar->new() ; $bar->test(456) ; print "$bar\n" ;
TEST> [Foo=HASH(0x1a4ece4) 123] Foo=HASH(0x1a4ece4) TEST> [Foo=HASH(0x15d53dc) 456] Foo=HASH(0x15d53dc)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Module Naming Dilemma
by Ven'Tatsu (Deacon) on Jan 06, 2005 at 18:26 UTC |