Stories
Slash Boxes
Comments
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)

Alias
  (email not shown publicly)
http://ali.as/

Journal of Alias (5735)

Monday May 14, 2007
11:06 AM

Tinderboxing YAML::Tiny

[ #33272 ]

The number of users of YAML::Tiny continues to grow, as I get the odd failing YAML sample or report from a friend of a friend here and there.

With YAML2 looking to involve C now, it's looking to me that YAML::Tiny is going to end up either in the Perl core or at least embedded into the CPAN clients, given the need to implement configure_depends.

It has a certain smell of inevitability about it, somewhat similar to the 0.900 series of PPI. You pretty much know what is going to happen, whether or not you want it to.

YAML::Tiny gradually fixes errors, and then at some point it is needed for parsing META.yml in some official capacity, at which point it needs to be able to handle ALL of the META.yml.

And since YAML::Tiny can't do that anyways (given it's not a full YAML parser) I'm going to reuse the same solution from PPI and just throw every single META.yml file on CPAN at YAML::Tiny and see what bugs get flushed out.

I've knocked up a test script to test it, using CPAN::Mini::Extract to get the META.yml files, checking to see if YAML::Tiny can parse the META.yml without crashing, and that the resulting structure matches that for YAML and YAML::Syck.

Already I've added a fix for empty hashes, and to add support for (by which I mean correctly successfully ignore) --- %YAML:1.0 style headers.

The script comes out to about 14,500 individual tests, of which currently about 1,100 are failing. Based on past experience, this should fall quickly as the low-hanging fruit is fixed, and then taper off to half a dozen or so cases in which the YAML files are the thing that's broken.

At which point YAML::Tiny should be safe for use in the CPAN clients (although they may not realise they need it yet) :)

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