Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Anonymous Hash in Constructor

by chromatic (Archbishop)
on Oct 19, 2012 at 05:01 UTC ( #999869=note: print w/ replies, xml ) Need Help??


in reply to Re: Anonymous Hash in Constructor
in thread Anonymous Hash in Constructor

Only if the named hash persists outside of the constructor.


Improve your skills with Modern Perl: the free book.


Comment on Re^2: Anonymous Hash in Constructor
Re^3: Anonymous Hash in Constructor
by sundialsvc4 (Monsignor) on Oct 19, 2012 at 13:49 UTC

    Which, of course, would not make sense to do.   The constructor’s purpose is to return a new unique instance of a blessed object as its return value.   So, the only “debate” here is whether, within the body of that constructor, the hash that is to be returned is specified anonymously or not.   And, it makes utterly no difference one way or the other to Perl.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (18)
As of 2014-09-02 20:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (29 votes), past polls