Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Data-Dumper CPAN distribution.

Report information
The Basics
Id: 14591
Status: new
Priority: 0/
Queue: Data-Dumper

People
Owner: Nobody in particular
Requestors: nothingmuch [...] woobling.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Data::Dumper doesn't handle mutually recursive structures
Download (untitled) / with headers
text/plain 472b
A test demonstrating the bug: use Test::More tests => 1; use Data::Dumper; my $x = { }; my $y = { }; $x->{y} = $y; $y->{x} = $x; is_deeply(eval Dumper($x), $x, "round trip of mutually recursive structure"); the code emitted by data dumper should emit something like $VAR1 = { }; $VAR2 = { x => $VAR1 }; $VAR1->{y} = $VAR2; Ordered dependency tree resolution could help determine nodes which are dependent on each other, and allow this fix. It's pretty ugly though.
To: bug-Data-Dumper [...] rt.cpan.org
Subject: Re: [cpan #14591] Data::Dumper doesn't handle mutually recursive structures
Date: Wed, 14 Sep 2005 11:47:29 -0700
From: Gurusamy Sarathy <gsar [...] ActiveState.com>
RT-Send-Cc:
Download (untitled) / with headers
text/plain 610b
On Wed, 14 Sep 2005 12:38:38 EDT, " via RT" wrote: Show quoted text
>This message about Data-Dumper was sent to you by NUFFIN <NUFFIN@cpan.org> via > rt.cpan.org > >Full context and any attached attachments can be found at: ><URL: https://rt.cpan.org/Ticket/Display.html?id=14591 > > >A test demonstrating the bug: > >use Test::More tests => 1; >use Data::Dumper; > >my $x = { }; >my $y = { }; >$x->{y} = $y; >$y->{x} = $x; > >is_deeply(eval Dumper($x), $x, "round trip of mutually recursive structure");
You're supposed to enable Purity for eval-able output. It works fine for me if I do that. Sarathy gsar@ActiveState.com


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.