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

Re: Data::Dumper question

by haoess (Curate)
on Apr 01, 2009 at 09:54 UTC ( [id://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

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://754662]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 04:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found