Subject: | Endless loop with self-refential structure |
[Tested with YAML::Tiny 1.21]
When trying to dump self-refential data, YAML::Tiny goes into an endless
loop eating lots of memory. Here's a test script. Be prepared to hit
CTRL-C or set resource limits before starting the script:
use YAML::Tiny qw(Dump);
#use YAML qw(Dump);
#use YAML::Syck qw(Dump);
my $x = {foo => "bla"};
$x->{self} = $x;
warn Dump($x);
__END__
YAML and YAML::Syck work OK with the sample data.
Regards,
Slaven