Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Why won't a hash in a hash work as a hash reference to create an object?

by Lady_Aleena (Deacon)
on Apr 07, 2012 at 21:22 UTC ( #963945=note: print w/ replies, xml ) Need Help??


in reply to Re: Why won't a hash in a hash work as a hash reference to create an object?
in thread Why won't a hash in a hash work as a hash reference to create an object?

Thank you moritz. Quick question, what is the value of $class supposed to be?

Have a cookie and a very nice day!
Lady Aleena


Comment on Re^2: Why won't a hash in a hash work as a hash reference to create an object?
Download Code
Replies are listed 'Best First'.
Re^3: Why won't a hash in a hash work as a hash reference to create an object?
by chromatic (Archbishop) on Apr 07, 2012 at 21:36 UTC

    It's the name of the class. If you call new as a method:

    my $obj = Class->new;

    ... then it'll be the invocant.

    (Don't not call new as a method. You set yourself up for all kinds of mess that way.)


    Improve your skills with Modern Perl: the free book.

Re^3: Why won't a hash in a hash work as a hash reference to create an object?
by moritz (Cardinal) on Apr 08, 2012 at 05:43 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2015-07-08 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (96 votes), past polls