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)