Skip Menu |

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

Report information
The Basics
Id: 29105
Status: resolved
Priority: 0/
Queue: YAML-Tiny

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

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



Subject: No distinction between integers and strings
The following does not appear to be correct: $ perl -MYAML::Tiny=Dump -le 'print Dump([3,"3"])' --- - 3 - 3 For some Perl applications, it's important to know if you really have a number and not a string. The only pure-perl non-core way of dealing this that I know of is to steal some code from Pointer.pm (specifically, using unpack with the 'P' template. Nasty, but that's all I can come up with). Cheers, Ovid
Subject: Re: [rt.cpan.org #29105] No distinction between integers and strings
Date: Mon, 3 Sep 2007 08:55:34 +1000
To: bug-YAML-Tiny [...] rt.cpan.org
From: "Adam Kennedy" <adamkennedybackup [...] gmail.com>
YAML::Tiny is intended to be compatible, where possible with YAML.pm and YAML::Syck. What do they do in the same situation? This sounds like one of those things for which support will probably not be added, and for which people should upgrade to a more-complete YAML library to me, on initial impressions at least. Adam K On 02/09/07, via RT <bug-YAML-Tiny@rt.cpan.org> wrote: Show quoted text
> > > Sat Sep 01 14:27:08 2007: Request 29105 was acted upon. > Transaction: Ticket created by OVID > Queue: YAML-Tiny > Subject: No distinction between integers and strings > Broken in: 1.14 > Severity: Normal > Owner: Nobody > Requestors: OVID@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=29105 > > > > The following does not appear to be correct: > > $ perl -MYAML::Tiny=Dump -le 'print Dump([3,"3"])' > --- > - 3 > - 3 > > For some Perl applications, it's important to know if you really have a > number and not a string. The only pure-perl non-core way of dealing > this that I know of is to steal some code from Pointer.pm (specifically, > using unpack with the 'P' template. Nasty, but that's all I can come up > with). > > Cheers, > Ovid >
This is probably going to be impossible with the limitations of the "Tiny" constraints. Adding documentation that YAML::Tiny does not retain the distinction between 3 and "3". Sorry, but you'll need to use a more capable module for that particular use case.