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: 4066
Status: resolved
Priority: 0/
Queue: YAML

People
Owner: Nobody in particular
Requestors: chris [...] clotho.com
Cc:
AdminCc:

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



Subject: Number vs. string heuristics for dump
YAML's dump method doesn't respect the string vs. number status of a scalar. This matters for version numbers, where trailing zeros may be relevent. E.g., META.yml files can be parsed incorrectly. Example code: -------------------- use YAML; use Data::Dumper; my $n = { version => "1.10" }; my $n2 = YAML::Load(YAML::Dump($n)); print Data::Dumper->Dump([$n],["original"]); print Data::Dumper->Dump([$n2],["YAMLfied"]); -------------------- Output of this code: -------------------- $original = { 'version' => '1.10' }; $YAMLfied = { 'version' => '1.1' }; -------------------- dump() should look at whether Perl thinks a scalar is a string or a number and, if a string, quote it.
This bug is resolved as of the current YAML (0.39). -- Chris P.S. I am the original requester.