in reply to Re: Mmmm ... cargo cult progamming is nummy!
in thread Adding autoloaded methods to symbol table with using strict refs
This clearly says to me "for the class of $this_thing, call new". Very clear.my $new_thing = (ref $this_thing)->new(@params);
You don't need to put (cargo-cult fashion) the "ref $proto || $proto" device in every single constructor. The caller can control this.
If you want to provide a clone method in your class, do so. But don't try to make "new" do double duty. It confuses those of us with some common sense.
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Mmmm ... cargo cult progamming is nummy!
by dws (Chancellor) on Feb 27, 2002 at 04:23 UTC | |
by merlyn (Sage) on May 19, 2003 at 08:30 UTC | |
by dws (Chancellor) on May 19, 2003 at 17:51 UTC |