It wasn't at all clear to me from the module documentation and it still wasn't completely clear from the responses. So, just to stress the points and clarify that they aren't contradicting...
Like I said, I couldn't find clarification reading the module documentation (Module::Install). But I looked at Makefile.PL to try to verify that inc/Module/Install.pm is supposed to get installed when you install Module::Install. I found this encouragement in a comment:
It causes inc::Module::Install to load from the (unique to this distribution) file ./lib/inc/Module/Install.pm instead
of the system inc::Module::Install or the bundled /inc/Module/Install.pm
So, "use inc::Module::Install;" works when a new module author runs "perl Makefile.PL" because they installed Module::Install which installed inc/Module/Install.pm along with Module/Install.pm. And "use inc::Module::Install;" works when some random person downloads the new module because inc/Module/Install.pm gets included in the new module's tar ball (or other archive format).
To make it even clearer, there are the chronological steps:
- New module author decides to use Module::Install for their new module
- Author downloads Module-Install tar ball and extracts contents
- Author runs "perl Makefile.PL" for Module-Install distribution
- Module::Install's Makefile.PL does "use lib 'lib'" then "use inc::Module::Install"
- perl finds lib/inc/Module/Install.pm that came with the Module-Install distribution
- Author eventually runs "make install" which creates inc/Module sub-directory tree under some ...perl.../...lib... where, if the new author didn't make some mistake, perl is already searching for its standard modules and copies Install.pm into it
- Author writes new Makefile.PL for their own module
- Author runs "perl Makefile.PL" for the first time
- The new Makefile.PL runs "use inc::Module::Include"
- perl finds inc/Module/Install.pm among its standard modules
- inc/Module/Install.pm makes inc/Module sub-directory tree under the new module's build directory and copies itself into there
- Author makes a distribution and Module::Install has arranged the "manifest" file to list inc/Module/Install.pm so that it gets included in the tar ball and uploaded to PAUSE and CPAN
- Random user downloads and extract this new module then runs "perl Makefile.PL"
- The new module's Makefile.PL runs "use inc::Module::Install"
- If the random user has Module::Install installed, then perl will find inc/Module/Install.pm among the main modules
- If not, then perl will find the one included in the new module's distribution
That explanation should be more than sufficiently exhaustive. :)
So, it seems that metaperl didn't install Module::Install correctly.
|