Skip Menu |

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

Report information
The Basics
Id: 41024
Status: resolved
Priority: 0/
Queue: YAML-Syck

Owner: TODDR [...]
Requestors: adam_lounds [...]

Bug Information
Severity: Important
Broken in: 1.05
Fixed in: 1.10_01

Subject: Doesn't round-trip strings that look like octal with ImplicitTyping on
Download (untitled) / with headers
text/plain 352b
for a string "01430730100100000100" with ImplicitTyping enabled and the string unquoted, I get Integer overflow in octal number at xyz/YAML/ line 75, <FH> line 1. Quoting forces it to a string, but on Dump the quotes are removed again. Essentially, Syck isn't quoting on Dump, but expecting quoting on Load when ImplicitTyping is enabled.
From: adam_lounds [...]
Download (untitled) / with headers
text/plain 1022b
script showing warning #!/usr/bin/perl use YAML::Syck; $YAML::Syck::ImplicitTyping = 1; local $SIG{__WARN__} = sub { die(shift); }; my $foo = { a => "01430730100100000100" }; my $dump = YAML::Syck::Dump($foo); eval { my $bar = YAML::Syck::Load($dump); # warning here }; if ($@) { warn("err $@"); } --- Test script showing different values after dump/load cycle #!/usr/bin/perl use YAML::Syck; use Test::More tests => 1; $YAML::Syck::ImplicitTyping = 1; my $foo = { a => "01430730100100000100" }; my $dump = YAML::Syck::Dump($foo); my $bar = YAML::Syck::Load($dump); is ($foo->{a}, $bar->{a}, "round-trip Dump/Load with ImplicitTyping"); --- [adam@adam_dev bin]# perl 1..1 Integer overflow in octal number at /xyz/i386-linux-thread-multi/YAML/ line 75. not ok 1 - round-trip Dump/Load with ImplicitTyping # Failed test 'round-trip Dump/Load with ImplicitTyping' # at line 10. # got: '01430730100100000100' # expected: '4294967295' # Looks like you failed 1 test of 1.
From: adam_lounds [...]
Ah, I can work around by using $YAML::Syck::SingleQuote = 1 when Dumping
(This is a form-reply that isn't specific to your particular report) YAML::Syck has just acquired one new maintainer (me), it still doesn't have anyone that *cares* about it. But I'm willing to help solve your report & release a new version with the fix if it's easy for me. It now has a Git repository at: If your report is a patch that fixes a problem, great. Please remake the patch against Git by forking that repo and sending me a pull request on GitHub (or an update to this bug if you prefer git-format-patch(1) or some other repo provider..). Make sure to include a test for what you fixed. If your report is some code that fails (and you have a testcase for it) a patch against the test suite to demonstrate that failure would be very useful. It's OK if the test crashes and burns, see Test::More's docs for how to make TODO tests that fail now, but shouldn't. Even if it segfaults perl C<system $^X => qw/ -Mblib -MYAML::Syck .../> or something like that and checking the return value will do.
Download (untitled) / with headers
text/plain 136b
octal, hex, and scientific numbers will not be treated as numbers on next release and so will be quoted. I suggest closing this ticket.

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

Please report any issues with to