ingydotnet / yaml-pm

YAML Perl Module
http://search.cpan.org/dist/YAML/
20 stars 27 forks source link

Mapping key `=` must be dumped with quotes #195

Closed perlpunk closed 6 years ago

perlpunk commented 6 years ago

Otherwise, when dumped as a plain scalar, it's the special "default" key:

use YAML;
use Data::Dumper;
my $hashref = {"=" => "bar"};
my $yaml = Dump $hashref;
say $yaml;
my $load = Load $yaml;
say Dumper $load;
__END__
---
=: bar

$VAR1 = {
          'YAMLVALUE' => 'bar'
        };
perlpunk commented 6 years ago

Released YAML 1.24_002