Subject: | String '~' gets mangled to undef |
I have discovered that if a hash value is the string '~' then doing
a dump and load will convert into an undef.
Here is a test (also attached) which shows the broken behaviour:
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 1;
use YAML::Syck ();
my $data = { foo => '~' };
my $yaml = YAML::Syck::Dump($data);
my $data2 = YAML::Syck::Load($yaml);
is_deeply($data, $data2, '~ should be returned as ~ not undef');
This is causing me quite a bit of trouble so I have marked the bug as
'important'.
Thanks,
Stephen Quinney
Subject: | test.pl |
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 1;
use YAML::Syck ();
my $data = { foo => '~' };
my $yaml = YAML::Syck::Dump($data);
my $data2 = YAML::Syck::Load($yaml);
is_deeply($data, $data2, '~ should be returned as ~ not undef');