Subject: | Consider moving load checks to import so require M::I will succeed |
Because of the way that "use Module::Install" dies under various
conditions (e.g. "use inc::Module::Install not use Module::Install"),
it's not possible to test that Module::Install is just installed via
eval "require Module::Install; 1".
CPAN::Reporter currently checks all prerequisites via a subprocess using
this form of require as simple "does it exist" checks don't ensure that
a dependency (and it's chain of dependencies) actually can load.
The net effect is that anything that lists Module::Install as a
prerequisite doesn't ever appear to get it satisfied. E.g.
Module::Install::ForC
If those checks for improper "use Module::Install" were moved to
import() instead of just being in the main file, a require test could
succeed. I'm not sure if this has other negative effects, but
semantically it seems sane, since you're really just trying to protect
against things going wrong when the wrong "import" is called.
-- David