Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Re: (jeffa) Re: My first stab at OO perl...by LanceDeeply (Chaplain) |
on Jul 16, 2002 at 21:32 UTC ( [id://182238]=note: print w/replies, xml ) | Need Help?? |
Maybe I just don't understand WHY the ref($cargocult) idea is so bad. To me, it makes perfect sense... If someone calls the constructor on an instance rather than the class, it forces it to act as if it were called on the class. Isn't this "correct" in most cases?
new is new and clone is clone. Conviently merging the two into one and differentiating by the call context feels like an icky version of polymorphism. btw: Great node, but I gotta tell ya- there are days when I wish I was bagging groceries rather than coding/debugging/supporting. :) Here are some nodes w/ some really good explanations: Ovid's (Ovid - minor code nits) Re: Adding autoloaded methods to symbol table with using strict refs merlyn's ref($proto) - just say no!
In Section
Seekers of Perl Wisdom
|
|