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.