Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: OO Perl: calling a constructor within a classby davorg (Chancellor) |
on Sep 26, 2001 at 14:10 UTC ( [id://114773]=note: print w/replies, xml ) | Need Help?? |
Many of my objects have a structure that looks like this:
Does that help you at all? Update: Actually I tend to agree with both tilly and merlyn on the class/instance method divide. The $class = ref $thing || $thing idiom just seems to be hard-wired into my conciousness thru reading in so many books. I have to think twice to not use it. Generally my new method will be a class method and I'll only create an instance method version in the rare cases when I need a copy constructor. --<http://www.dave.org.uk> "The first rule of Perl club is you don't talk about Perl club."
In Section
Seekers of Perl Wisdom
|
|