Subject: | LoadFile($file) doesn't parse $file with tabs |
Hello,
YAML::Syck::LoadFile($file) fails parsing $file if one uses tabs to
arrange values.
e.g.:
$ cat foo.yml
foo:
- bar
- baz
baz: foo
$ perl -Mstrict -MData::Dumper -MYAML::Syck -wle 'my $conf =
YAML::Syck::LoadFile("./foo.yml"); print Dumper $conf'
Syck parser (line 2, column 3): syntax error at /[..]/YAML/Syck.pm line
76, <$fh> line 1.
If one changes tabs to space/s parsing works :) .
e.g.:
$ cat foo.yml
foo:
- bar
- baz
baz: foo
$ perl -Mstrict -MData::Dumper -MYAML::Syck -wle 'my $conf =
YAML::Syck::LoadFile("./foo.yml"); print Dumper $conf'
$VAR1 = {
'baz' => 'foo',
'foo' => [
'bar',
'baz'
]
};
This has been observed on Linux 32bit 2.6.32-31-generic with perl 5,
version 14, subversion 1 (v5.14.1) and YAML-Syck-1.17.
YAML::Syck::LoadFile($file) working with tabs in $file to arrange values
would be a 'nice to have' (imho), as it was my first attempt to create
$file with tabs rather than space/s.
kind regards,
Robert