in reply to Re: OO style: Placement of "new"
in thread OO style: Placement of "new"
However, that's precisely the same problem you get when you donew Critter ('Bam' x 2), 1.4, 45
so that's nothing new.print ('Bam' x 2), 1.4, 45;
OTOH, the one problem I did notice with this "indirect object method", is that it doesn't work with perl's built-in keywords — and likely other predefined subs as well, so the next doesn't call the method "open" in the class "ReadFile":
Instead, you have to usemy $handle = open ReadFile($file);
I guess that falls under "the same ambiguity as ordinary list operators", in perlobj.my $handle = ReadFile->open($file);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: OO style: Placement of "new"
by Abigail-II (Bishop) on Apr 08, 2003 at 09:48 UTC |