Subject: | circular structure causes infinite recursion |
A simple circular structure causes infinite recursion.
Subject: | z2.pl |
use Test::More tests => 1;
use Data::Difference qw(data_diff);
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 = data_diff($a,$b);
pass("done");