Skip Menu |

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

Report information
The Basics
Id: 11281
Status: new
Priority: 0/
Queue: YAML-Parser-Syck

Owner: Nobody in particular
Requestors: david_garamond [...]

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

Subject: Boolean loaded as string (and thus always becomes true)
Download (untitled) / with headers
text/plain 950b
YAML::Parser::Syck 0.01, Syck 0.35 and Syck 0.42, tested on Linux (Redhat 7.3 and Debian Sarge), Perl 5.8.1 and 5.8.4. Problem: YAML::Parser::Syck (and YAML too, for that matter) loads YAML's Yes/No/true/false into 'Yes'/'No'/'true'/'false' strings, all of which are true in Perl. This creates interoperability problem with Ruby and PHP (and perhaps Python too, but I didn't test Python). Please compare: $ echo '<? if (!extension_loaded("dl")) dl(""); print_r(syck_load("a: No\nb: Yes\nc: false\nd: true\n")); ?>'|php -q Array ( [a] => [b] => 1 [c] => [d] => 1 ) $ ruby -ryaml -e'p YAML::load("a: No\nb: Yes\nc: false\nd: true\n")' {"a"=>false, "b"=>true, "c"=>false, "d"=>true} $ perl -MYAML::Parser::Syck -MData::Dumper -e'print Dumper(YAML::Parser::Syck::Parse("a: No\nb: Yes\nc: false\nd: true\n"))' $VAR1 = { 'a' => 'No', 'b' => 'Yes', 'd' => 'true', 'c' => 'false' };

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

Please report any issues with to