Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the YAML-LibYAML CPAN distribution.

Report information
The Basics
Id: 72134
Status: resolved
Priority: 0/
Queue: YAML-LibYAML

People
Owner: Nobody in particular
Requestors: khedin [...] gmail.com
Cc:
AdminCc:

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



Subject: Nested array dumped incorrectly by YAML::XS
perl -we 'use YAML::XS; print Dump([{x=>1}, [{y=>2, z=>3}]])' perl -we 'use YAML; print Dump([{x=>1}, [{y=>2, z=>3}]])' The structure output by the first sample is reported as incorrect by YAML, and some files with such structure even cause YAML::XS to coredump: (see attach for bad2.yml): perl -we 'use YAML::XS; local $/=""; $_=<>; my $struct = Load($_); print scalar @$struct; ' bad2.yml
Subject: bad2.yml
--- - foo: 1 bar: 2 baz: 3 - - x: 1 y: foo z: !!perl/regexp (?i-xsm:^TNK) - x: 1 y: foo z: !!perl/regexp (?i-xsm:^TNK)
On Thu Nov 03 08:22:58 2011, Dallaylaen wrote: Show quoted text
> perl -we 'use YAML::XS; print Dump([{x=>1}, [{y=>2, z=>3}]])' > > perl -we 'use YAML; print Dump([{x=>1}, [{y=>2, z=>3}]])' > > The structure output by the first sample is reported as incorrect by > YAML, and some files with such structure even cause YAML::XS to coredump: > > (see attach for bad2.yml): > > perl -we 'use YAML::XS; local $/=""; $_=<>; my $struct = Load($_); print > scalar @$struct; ' bad2.yml
1. I can't reproduce a coredump, so this has probably been fixed at some point. 2. The format of nested sequence in YAML::XS output is valid YAML, but YAML.pm doesn't support this. YAML.pm should be fixed or replaced IMHO. Closing.