Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re: (jeffa) Re: My first stab at OO perl...
in thread My first stab at OO perl...

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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://182238]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2024-04-23 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found