Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the YAML CPAN distribution.

Report information
The Basics
Id: 73736
Status: open
Priority: 0/
Queue: YAML

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.78
Fixed in: (no value)



Subject: Cannot parse simple scalar yaml containing TABs
Download (untitled) / with headers
text/plain 778b
The attached yaml document cannot be parsed with YAML.pm, but works with both YAML::Syck and YAML::XS. The results are: $ /usr/perl5.12.0/bin/ysh -MYAML < simple.yaml YAML Error: Inconsistent indentation level Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION Line: 2 Document: 1 at /usr/perl5.12.0/lib/site_perl/5.12.0/YAML/Loader.pm line 719 $ /usr/perl5.12.0/bin/ysh -MYAML::Syck < simple.yaml $VAR1 = '1 This yaml is invalid'; $ /usr/perl5.12.0/bin/ysh -MYAML::XS < simple.yaml $VAR1 = '1 This yaml is invalid'; I did not look up into the YAML spec to see if actually YAML.pm is right and the others are not. If this is the case then feel free to move this ticket to the YAML-Syck and YAML-XS RT queues. Regards, Slaven
Subject: simple.yaml
Download simple.yaml
text/x-yaml 35b
--- 1 This yaml is invalid
Subject: Re: [rt.cpan.org #73736] Cannot parse simple scalar yaml containing TABs
Date: Wed, 4 Jan 2012 12:57:10 -0800
To: bug-YAML [...] rt.cpan.org
From: Ingy dot Net <ingy [...] ingy.net>
Download (untitled) / with headers
text/plain 1.4k
There are so many things that YAML cannot do properly. I will add this to the test suite. The longer term plan is to move current YAML.pm to YAML::Old then to make YAML.pm act like a DBI for various yaml implementations. Some work on this has begun as YAML2.pm. On Wed, Jan 4, 2012 at 5:38 AM, Slaven_Rezic via RT <bug-YAML@rt.cpan.org>wrote: Show quoted text
> Wed Jan 04 08:38:53 2012: Request 73736 was acted upon. > Transaction: Ticket created by SREZIC > Queue: YAML > Subject: Cannot parse simple scalar yaml containing TABs > Broken in: 0.78 > Severity: (no value) > Owner: Nobody > Requestors: SREZIC@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73736 > > > > The attached yaml document cannot be parsed with YAML.pm, but works with > both YAML::Syck and YAML::XS. The results are: > > $ /usr/perl5.12.0/bin/ysh -MYAML < simple.yaml > > YAML Error: Inconsistent indentation level > Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION > Line: 2 > Document: 1 > at /usr/perl5.12.0/lib/site_perl/5.12.0/YAML/Loader.pm line 719 > $ /usr/perl5.12.0/bin/ysh -MYAML::Syck < simple.yaml > $VAR1 = '1 This yaml is invalid'; > $ /usr/perl5.12.0/bin/ysh -MYAML::XS < simple.yaml > $VAR1 = '1 This yaml is invalid'; > > I did not look up into the YAML spec to see if actually YAML.pm is right > and the others are not. If this is the case then feel free to move this > ticket to the YAML-Syck and YAML-XS RT queues. > > Regards, > Slaven > >
Download (untitled) / with headers
text/plain 520b
I get the same error when I try to load a line written by YAML::XS which it wrote with a newline and hanging indent. I.e.: my $foo = join(' ', ('ABC')x50); When dumped with YAML::XS this is: --- foo: ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ... but that loads correctly. When loaded with YAML.pm, it causes the error mentioned by the requestor. Mark
This example is correctly readable in the attachment file here. Mark
Subject: foo.yaml
Download foo.yaml
text/x-yaml 213b
--- foo: ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC ABC
Download (untitled) / with headers
text/plain 150b
Unfortunately this means one is wedded to YAML::XS or YAML::Syck if any scalar line lengths are greater than the default width... 84 characters? Mark
Download (untitled) / with headers
text/plain 247b
This issue has been copied to: https://github.com/ingydotnet/yaml-pm/issues/121 please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.