Skip Menu |
 

This queue is for tickets about the Data-YAML CPAN distribution.

Report information
The Basics
Id: 46710
Status: new
Priority: 0/
Queue: Data-YAML

People
Owner: Nobody in particular
Requestors: mail [...] caugustin.de
Cc:
AdminCc:

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



Subject: Data::YAML 0.0.6 Reader Bug with single quoted hash keys
Date: Sun, 7 Jun 2009 10:24:52 +0200
To: bug-data-yaml [...] rt.cpan.org
From: Christian Augustin <cma [...] snafu.de>
Download (untitled) / with headers
text/plain 802b
Hi, I gave Data::YAML a try and stumbled about a problem with single quoted strings as hash keys (produced by Data::YAML::Writer 0.0.6) in Data::YAML::Reader 0.0.6. Looks like a problem with the $HASH_LINE RegExp using only $QQ_STRING. By introducing $SQ_STRING it works for me (but perhaps not for all use cases): my $QQ_STRING = qr{ " (?: \\. | [^"] )* " }x; my $SQ_STRING = qr{ ' (?: '' | [^'] )* ' }x; my $HASH_LINE = qr{ ^ ( $SQ_STRING | $QQ_STRING | \S+ ) \s* : (?: \s + (.+?) \s* )? $ }x; The YAML written by Data::YAML::Writer that caused the problem looked similiar to this (to prepare a test case): --- 'First key': - 140 - 0 - 0 - 0 - EUR 'Second key': - 137 - 20000 - 21060 - 33000 - EUR ... Kind regards -- Christian Augustin mail@caugustin.de


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.