andk/cpanpm — pull request #46 by miyagawa (2013-09-02 19:22:57+00:00)
Title: Load META.yml not META.json in read_yaml

With ETHER/MooseX-Storage-0.40, it doesn't pick up the correct dependencies (Test::CheckDeps) out of MYMETA files.

Here's what seems to be happening:

* CPAN.pm doesn't prefer META files, including MYMETA, if dynamic_config is true
* It falls back to META.yaml, however `pick_meta_file` could return MYMETA.json here, then parsing will fail

There's this "dynamic_config" check in multiple places, and I think MYMETA should be honored when dynamic_config is true, instead of falling back to YAML *then* honor it if its filename is MYMETA.

As noted in the comment, read_yaml() might need to be deprecated sooner.

However this fix should work as a band-aid to remedy the error here.