Subject: | inconsisten indentation error with '<<' as first key in mapping |
Hi,
in an YAML based config module I have added support for the special
key '<<', used for merging entries. However I ran into a
YAML_PARSE_ERR_INCONSISTENT_INDENTATION error, when '<<' is the first
key in a mapping. This look like a bug to me.
So far everything looks OK when '<<' is the second key in a mapping.
I have attached a short example.
Regards, Bernhard
Subject: | yaml_indent.pl |
use strict;
use warnings;
use 5.8.0;
use YAML 0.58 ();
use Data::Dumper ();
my ( $arrref_ok ) = YAML::Load(<<'END_YAML');
- arr_key_2: arr_val_2
<<: arr_val_1
END_YAML
# my ( $arrref_nok ) = ( [] );
my ( $arrref_nok ) = YAML::Load(<<'END_YAML');
- <<: arr_val_1
arr_key_2: arr_val_2
END_YAML
print Data::Dumper::Dumper( $arrref_ok, $arrref_nok );