Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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?
[TCLion]: I am breaking down the line and putting the date in the correct order during output
[TCLion]: at least that's the plan
[1nickt]: Corion this looks good, from the pod: "there are 9000+ variations that are detected correctly in the test files (see t/data/* for most of them). If you can think of any that I do not cover, please let me know."
[TCLion]: some moron put the date like this : Mon Feb 20 09:31:30 2017
[Corion]: 1nickt: Yes, the module sounds promising indeed
[1nickt]: "putting the date in correct order" how?
[Corion]: TCLion: Whee ;)
[TCLion]: need to put like this : 2017-02-20 09:30:53
[1nickt]: That's why I asked if you are using DateTime. It has a large number of supporting modules (the author likes the term 'eco-system') so if you are already creating a DateTime obj from your dates, this module would read in the mnoron-formatted 1s seamlessly
[TCLion]: when I put the date together it looks like : 2017-Feb-24 (month is the problem)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (14)
As of 2017-03-23 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (288 votes). Check out past polls.