Subject: | circular structure causes infinite recursion |
A fairly simple circular structure causes Data::Rlist::CompareData to fail.
Subject: | z2.pl |
use Test::More tests => 1;
use Data::Rlist qw(CompareData);
my $a = { x => [] };
push(@{$a->{x}}, $a->{x});
my $b = { x => [] };
push(@{$b->{x}}, $b->{x});
$SIG{ALRM} = sub { fail("timeout"); exit };
alarm(5);
my @r = CompareData($a,$b);
pass("done");