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 ]

dagolden (6584)

  (email not shown publicly)
AOL IM: xdaveg (Add Buddy, Send Message)

Journal of dagolden (6584)

Thursday January 08, 2009
05:35 PM

How many parsers does it take to break META.yml?

[ #38243 ]

It looks like Perl 5.10.1 may include Parse::CPAN::Meta, so that CPAN and CPANPLUS will support 'configure_requires' out-of-the-box. This is a major step in improving forward compatibility of the CPAN installation toolchain.

However, it sparked a discussion on perl5-porters whether Parse::CPAN::Meta is ready to take on any META.yml on CPAN and so I used the visitcpan tool I wrote about in my last journal post to investigate.

I checked not only how Parse::CPAN::Meta handled META.yml, but also YAML::XS, YAML::Syck, YAML::Tiny and Plus, I cross-checked each pair to see whether they produced the same output.

The results show that very few of the 16,000 or so distributions on CPAN have META.yml problems (most probably don't even have META.yml). But of those that do, the different YAML parsers can give subtly different output. (Click any red "-" box to see details.)

Is Parse::CPAN::Meta any worse than the others? Hard to say. Personally, I think it's "good enough" for 5.10.1 and hope any corner cases are fixed over time.

-- dagolden

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.
  • Looking through several of those red minus signs, I saw that apparently a lot of the problem are caused by whether the YAML parser treats the META.yml file as UTF-8, or as some single byte encoding (most likely ISO-8859-1).

    Some examples: 1 [], 2 [], 3 []

    It looks like a knot needs to be cut through, a decision needs to be made: what encoding should a META.yml file be? Maybe it could make use of a BOM [] in case the default is ISO-8859-1, and the author prefers UTF-8, for some reason (for example, to spell his name corr

  • ... good that cpants is of some use :-)
    • Yes -- saved me some time figuring out how to do a table like that, plus I told all the cranks on #p5p complaining about red-green colorblindness that I just copied CPANTS... :-)