CC: | SMUELLER [...] cpan.org |
Subject: | Trips over quoted hash key |
% echo "---
configure_requires:
'Foo::Bar': 3.14
" > ttt.yml
% perl -e '
use strict;
for my $m ("YAML", "YAML::Syck", "YAML::XS", "YAML::Tiny",
"Parse::CPAN::Meta"){
my $y = eval "use $m; $m\::LoadFile q{ttt.yml} or die";
print $@ if $@;
printf "%18s (%s): %s\n", $m, $m->VERSION, join(",",keys
%{$y->{configure_requires}});
}
'
YAML (0.71): Foo::Bar
YAML::Syck (1.07): Foo::Bar
YAML::XS (0.32): Foo::Bar
YAML::Tiny does not support a feature in line ' 'Foo::Bar': 3.14' at
(eval 32) line 1
YAML::Tiny (1.41):
Parse::CPAN::Meta does not support a feature in line ' 'Foo::Bar':
3.14' at (eval 36) line 1
Parse::CPAN::Meta (1.40):
This can be extended to failing roundtrip on a string containing quotes:
% perl -e '
use Data::Dumper; use YAML::Tiny; use strict;
my $y = YAML::Tiny::Dump +{ qq[\x{27}a quoty \x{22} key] => 1 };
print $y;
my $rt = YAML::Tiny::Load $y;
print Data::Dumper::Dumper($rt);
'
---
'a quoty " key: 1
YAML::Tiny does not support a feature in line ''a quoty " key: 1' at -e
line 5
Grading important because bug was discovered while parsing a META.yml.
Greets,