Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the YAML CPAN distribution.

Report information
The Basics
Id: 81395
Status: resolved
Priority: 0/
Queue: YAML

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

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



Subject: Trips over "=" in hash key
use strict; use warnings; use YAML; my $hashref = {"= foo" => "bar"}; YAML::DumpFile "foo.yaml", $hashref; my $loaded = YAML::LoadFile "foo.yaml"; __END__ Running above script gives this error: YAML Error: Invalid element in map Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT Line: 2 Document: 1 at C:/strawberry/perl/vendor/lib/YAML/Loader.pm line 352. The file foo.yaml is created and looks as follows: --- = foo: bar Opening the file with an editor and putting quotes around the key, so that it looks as shown below, and then trying to load it, works fine. --- '= foo': bar my $loaded = YAML::LoadFile "foo.yaml"; # This works, after editting file $ perl -v This is perl 5, version 16, subversion 1 (v5.16.1) built for MSWin32-x64-multi-thread ... $ perl -MYAML -e "print $YAML::VERSION" 0.84
This issue has been copied to: https://github.com/ingydotnet/yaml-pm/issues/130 please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with.
This will be fixed in YAML 1.25, closing now