Skip Menu |

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 115945
Status: resolved
Priority: 0/
Queue: CPAN

People
Owner: Nobody in particular
Requestors: haarg [...] haarg.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.03-TRIAL



Subject: MYMETA.json will sometimes be decoded as YAML and treated as meta v1
If MYMETA.json contains something that can't be decoded by CPAN::Meta (via JSON::PP), CPAN.pm will try to decode it using the configured yaml_module. Some YAML parsers (YAML::Syck, YAML::XS, sometimes YAML::Any) will succeed in parsing the file. CPAN.pm will then treat the file as meta v1 data, and miss all of the prereqs. Instead, CPAN.pm should fall back to the MYMETA.yml file, or even parsing the Makefile. It may also be good to only use CPAN::Meta::YAML, Parse::CPAN::Meta, or CPAN::Meta for decoding META.yml/MYMETA.yml files, rather than whatever is configured for general YAML handling. This issue has led to a number of CPAN testers failure reports like the following: http://www.cpantesters.org/cpan/report/3cb1d41e-3d45-11e6-9fc5-14bfbd15da07 MYMETA.json decoding is failing in this case due to Unicode handling issues on early perl 5.8 versions that JSON::PP < 2.27400 runs into.
Note that while this was found based on issues limited to older versions of perl, there are other things that could prevent CPAN::Meta from parsing the MYMETA file, especially now that CPAN::Meta is learning to use alternate JSON backends.
Actually, it looks like this has been fixed. I thought I had verified with an up to date CPAN.pm, but I guess not.