Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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.

Replies are listed 'Best First'.
Re^3: Anonymous Hash in Constructor
by sundialsvc4 (Abbot) 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?
[marto]: LanX I'd rather commit sudoku :P
[marto]: trench humour folks, feeling rough.
[marto]: there is never a night when they sleep all the way through, but last night was something else
[marto]: gave in at 3:45 ish and let Charlie watch videos about spitfires, the battle of Britain. He's plane crazy
[1nickt]: marto soothing!
[marto]: Hiromi makes an appearance, let's hope Jools doesn't ruin it by joining in on the old Joanna
[1nickt]: karlgoethebier What is the issue with the semic-colon after the ellipsis? It's documented as proper syntax ...;
[karlgoethebier]: Crazy? What should i say? Son just started his third studies. Next week i have a session with my therapist ;-)

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2017-11-18 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?