Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Data::Dumper and Cookies

by sundialsvc4 (Monsignor)
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' ] );


Comment on Re^2: Data::Dumper and Cookies
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2014-08-29 10:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (278 votes), past polls