|Subject:||Install fails if the distribution has a META.json which specifies a configure_requires value and sets dynamic_config to true.|
|Date:||Wed, 15 Jun 2011 20:33:58 +0000 (GMT)|
Distribution has a Build.PL which uses non-core modules. The modules /are/ specified in configure_requires, but the modules don't get installed, so compilation of Build.PL fails. The problem appears to be with CPAN::Distribution::configure_requires(). pick_meta_file() finds the META.json. The condition in configure_requires() calls read_meta(), which correctly parses the JSON, but then discovers that dynamic_config is true and so does not return the meta object. Back in configure_requires(), the else clause kicks in, which then attempts parse_meta_yml() on the META.json file, which obviously fails, and thus configure_requires returns no dependencies. I'm assuming that read_meta() shouldn't be changed to return the object regardless of whether dynamic_config is true, so configure_requires() should be changed to not assume YAML if read_meta() doesn't return an object.