Subject: | integer becomes string ? |
Date: | Fri, 8 Jan 2016 22:57:29 +0100 |
To: | bug-YAML-Tiny [...] rt.cpan.org |
From: | Loïc TROCHET <losyme [...] gmail.com> |
Hello,
Why integer becomes string ?
YAML::Tiny v1.69
afac.yml
-------------
section:
one: -1.056
three: +33
Foo: Bar
empty: ~
canonical: 685230
afac.pl
----------
use strict;
use warnings;
use YAML::Tiny qw(LoadFile);
use Data::Dumper;
my $c = LoadFile('/tmp/afac.yml');
print Dumper($c), "\n";
perl afac.pl
----------------
$VAR1 = {
'section' => {
'three' => '+33',
'empty' => undef,
'one' => '-1.056',
'Foo' => 'Bar'
},
'canonical' => '685230'
};