Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: nested unbless of Data::Dumper output

by Eliya (Vicar)
on Mar 20, 2013 at 11:19 UTC ( #1024496=note: print w/ replies, xml ) Need Help??


in reply to nested unbless of Data::Dumper output

Not entirely sure I understand what you need, but if the idea is to avoid cross references being created, you might want to try $Data::Dumper::Deepcopy = 1;

For the following sample structure, the difference in output would be

my $y = { foo => "bar" }; my $X = { a => $y, b => $y, c => $y }; $Data::Dumper::Deepcopy = 1; print Dumper($X);
$VAR1 = { 'c' => { 'foo' => 'bar' }, 'a' => { 'foo' => 'bar' }, 'b' => { 'foo' => 'bar' } };

while the default output (Deepcopy=0) would look like

$VAR1 = { 'c' => { 'foo' => 'bar' }, 'a' => $VAR1->{'c'}, 'b' => $VAR1->{'c'} };


Comment on Re: nested unbless of Data::Dumper output
Select or Download Code
Replies are listed 'Best First'.
Re^2: nested unbless of Data::Dumper output
by coke4all (Novice) on Mar 20, 2013 at 12:42 UTC

    Thanks, this is exactly what i needed!!!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2015-07-30 07:08 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 (270 votes), past polls