Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Should IO::YAML ignore leading comments?by dynamo (Chaplain) |
on Sep 18, 2007 at 19:17 UTC ( [id://639735]=note: print w/replies, xml ) | Need Help?? |
I don't think it's a bug. And it's not necessarily ignoring leading comments in that case - the "---" line is a document start indicator, and is optional.
So you have an empty doc there with a comment, and then another doc w/ data. Try putting your comment below the "---"
- dyn Update: I was wrong. The leading comment should NOT start a new document, this IS a bug. See the spec as it relates to comments. Also, see this example, where it says two documents rather than the four it would be if comments were their own documents. Despite this, in the interests of pragmatism, if you don't want to fix IO::YAML or wait for the author to do so, I'd still recommend putting the comment below the start indicator.
In Section
Seekers of Perl Wisdom
|
|