in reply to Here's a quick example why not to use Indirect notation
in thread Perl High School
I find this less than compelling, perhaps because I always use parenthesis on method or function calls. my $bar = new FOO(); isn't going to be tripped up by having written a new routine in the current package. Consider
Update: hold on, my $f = new FOO; # also prints "right!" Where's the problem?package FOO; sub new { print "right!\n"; } package BAR; sub new { print "wrong!\n"; } my $f = new FOO(); # prints "right!"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Here's a quick example why not to use Indirect notation
by dragonchild (Archbishop) on Feb 22, 2002 at 18:08 UTC | |
by dws (Chancellor) on Feb 22, 2002 at 18:50 UTC | |
by dragonchild (Archbishop) on Feb 22, 2002 at 19:53 UTC | |
by dws (Chancellor) on Feb 22, 2002 at 21:13 UTC |