You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a case that YAML 1.15 parse and YAML::XS 0.59 throws exception:
A minimal version is:
se 5.010;
use strict;
use warnings;
use Data::Dumper qw(Dumper);
use YAML;
use YAML::XS;
my $data = <<'END';
a:
- b: c:
END
my $x = YAML::Load($data);
say "ok YAML $YAML::VERSION"; # YAML 1.15 parses properly
say Dumper $x;
my $y = YAML::XS::Load($data);
say "ok YAML::XS $YAML::XS::VERSION"; # 0.59
# Following error:
# YAML::XS::Load Error: The problem:
#
# mapping values are not allowed in this context
#
# was found at document: 1, line: 2, column: 9
The text was updated successfully, but these errors were encountered:
#!perl
use strict;
use warnings;
use YAML ();
use YAML::XS ();
use YAML::Syck ();
use Data::Dumper;
my $conf = <<'TEST';
---
foo:
- bar:
- -baz
TEST
test( $_ ) for qw(
YAML
YAML::XS
YAML::Syck
);
sub test {
my $what = shift;
my $func = \&{ $what . '::Load' };
eval {
printf "%s v%s:\n", $what, $what->VERSION;
print Dumper $func->( $conf );
1;
} or print "FAIL($what): $@\n";
}
I found a case that YAML 1.15 parse and YAML::XS 0.59 throws exception:
A minimal version is:
The text was updated successfully, but these errors were encountered: