Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Data::Dumper and Cookies

by sundialsvc4 (Abbot)
on Jul 08, 2013 at 19:48 UTC ( #1043173=note: print w/replies, xml ) Need Help??


in reply to Re: Data::Dumper and Cookies
in thread Data::Dumper and Cookies

That’s a key point.   (Up-voted!)   When the perldoc's tell you that a particular call returns an object, then that’s what you should work from:   treat it as an object, ask it questions, and dump the answers.   If you simply dump the object, it’s kinda like looking at an X-ray picture:   “yeah, that’s what the guts of the thing look like (ugh!), but that’s not really what I want to know.”   (You’d have to understand the deep-guts of the thing to understand what you are looking at, and who wants to stick their hands in guts when the thing is alive and can answer questions?)   Instead, call its methods, and dump what they tell you:

print STDERR Data::Dumper->Dump( [ $myobject->foo(), $myobject->bar(), $myobject->bletch() ], [ 'foo says', 'bar says', 'bletch says' ] );

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043173]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2016-12-09 23:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (158 votes). Check out past polls.