Subject: | Does not support inline comments |
perl -v returns This is perl, v5.10.0 built for
x86_64-linux-gnu-thread-multi
uname -r returns 2.6.32.14
YAML::Tiny 1.41 Fri 11 Dec 2009
The yaml file:
---
- this # is
- a # comment
will be parsed by YAML::Tiny as sequence of two strings, "this # is" and
"a # comment". The YAML docs, and the man page of YAML::Tiny, seem to
indicate this is a inline comment and the result should be a sequence of
test strings "this" and "a".
Subject: | yaml-tiny-inline-comments.pl |
#!/usr/bin/perl
# burt rosenberg
# burt@cs.miami.edu
# 5 june 2010
use YAML::Tiny ;
$hd = <<END;
---
- this # is
- a # test
END
my $yaml = YAML::Tiny->new ;
$yaml = YAML::Tiny->read_string($hd) ;
printf "%s\n", $yaml->[0]->[0] ;