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

Re: Data::Dumper question

by haoess (Curate)
on Apr 01, 2009 at 09:54 UTC ( #754662=note: print w/ replies, xml ) Need Help??


in reply to Data::Dumper question

RTFM?

$OBJ->Values([ARRAYREF])

Queries or replaces the internal array of values that will be dumped. When called without arguments, returns the values. Otherwise, returns the object itself.

Update (example code):

print $d->Values([$this])->Dump(); print $d->Values([$that])->Dump(); print $d->Values([$otherthing])->Dump();

-- Frank


Comment on Re: Data::Dumper question
Select or Download Code
Replies are listed 'Best First'.
Re^2: Data::Dumper question
by perl5ever (Pilgrim) on Apr 01, 2009 at 13:41 UTC
    I guess I did overlook that. Thanks! For convenience it would be nice, though, if that capability was integrated into the Dump method.
Re^2: Data::Dumper question
by perl5ever (Pilgrim) on Apr 01, 2009 at 13:39 UTC
    I guess I did overlook that. Thanks!
Re^2: Data::Dumper question
by perl5ever (Pilgrim) on Apr 01, 2009 at 17:33 UTC
    Here's another problem -- when you set the thing to be dumped via Values(), the Dumper object retains a reference to the thing to be dumped.

    It would be a lot nicer if it would just hold on to the dumpee only for the duration of the Dump call.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2015-07-31 19:33 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 (280 votes), past polls