Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Alias (5735)

  (email not shown publicly)

Journal of Alias (5735)

Saturday January 12, 2008
06:29 AM

YAML::Tiny polishing continues... now with YAML 1.1 support

[ #35373 ]

Writing up a "YAML Tiny" specification has meant that I've been forced back to the YAML specification to make sure what I'm doing actually makes sense.

In the process, I discovered I wasn't supporting the %YAML directive correctly, and I've not only corrected it, but added a bit more flexibility as well (1 additional line of code).

As a result, YAML::Tiny is now the ONLY YAML parser that supports the official YAML 1.0 standard, the YAML 1.1 2004 draft specification, and the idiosyncratic form used in META.yml.

Withing the context, of course, of the subset of the YAML specification that YAML::Tiny supports.

Every other YAML parser available for Perl supports EITHER one or the other, and crashes (parser error) on the rest. supports the META.yml form, but not the YAML 1.0 or 1.1 spec.

YAML::Syck supports the META.yml form (but corrupts the passed-in string), and the YAML 1.0 spec, but not the 1.1 spec.

And YAML::XS supports the 1.1 spec, but does not support the 1.0 spec or the META.yml form.

The main difference between 1.1 and 1.0 is that they decided to change the string that indicates which version of YAML it is.

So in the 1.0 spec you say


And in the YAML 1.1 spec you say

%YAML 1.1

Personally, for me this has to rank as just about one of the most stupid formatting changes I've ever seen.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.