Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAML vs YAML::XS - space needed after : #152

Open
szabgab opened this issue Oct 16, 2015 · 0 comments
Open

YAML vs YAML::XS - space needed after : #152

szabgab opened this issue Oct 16, 2015 · 0 comments

Comments

@szabgab
Copy link

szabgab commented Oct 16, 2015

A case where YAML 1.15 would accept something that YAML::XS 0.59 would not.
A minimal version of it:

use 5.010;
use strict;
use warnings;

use Data::Dumper qw(Dumper);
use YAML;
use YAML::XS;

my $data = <<'END';
x:
  'a': 'a'
  'b':'b'
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:
# 
#     could not find expected ':'
# 
# was found at document: 1, line: 4, column: 1
# while scanning a simple key at line: 3, column: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant