Hi imacat,

If you're interested in fixing this, please join the module-build list 
or follow it on nntp.

# from imacat
# on Tuesday 15 January 2008 10:50:

>   Some (not all) Module::Build users supply a Makefile.PL that:
>
>     (a) Raise a CPAN shell that install Module::Build.
>     (b) Use Module::Build to install itself.
>
>    There are 2 problems with this setting.  For a non-root user that
>want to install to their home directory, having their CPAN shell with:
>
>makepl_arg => "INSTALLDIRS=/home/jenny/perl"
>mbuild_arg => "installdirs=/home/jenny/perl"
>(or for CPANPLUS,
>makemakerflags => "INSTALLDIRS=/home/jenny/perl"
>buildflags => "installdirs=/home/jenny/perl")
>
>     1. The (a) won't work.  The raised CPAN shell does not get the
>INSTALLDIRS or installdirs.  It will try to install into the system
>library directories and fail.  In that case, that strange Makefile.PL
>will enter an endless loop retrying to install Module::Build again and
>again.

Why doesn't the spawned cpan shell get these variables?

>     2. The (b) won't work, too.  Module::Build does not obtain
>"installdirs=/home/jenny/perl", but "INSTALLDIRS=/home/jenny/perl".
>  It will try to install into the system library directories and fail,
> too.

This sounds like a simple extension of "(a) won't work".

>    As far as I know, the CPAN and CPANPLUS shells both assume
>Makefile.PL is for ExtUtils::MakeMaker, and Build.PL is for
>Module::Build.  Therefore, providing Makefile.PL that runs
> Module::Build but not ExtUtils::MakeMaker should be considered a
> mistake.

No, this is a compatibility layer.  It still generates a Makefile and 
should honor the EU::MM interface.  It just runs Build.PL via that 
Makefile.

>    However, there seems to be a lot of authors supplying that same
>Makefile.PL.  I do not know why.  As what I read from the
> Module::Build documentation, though little, I did not see such
> suggestion anywhere. If someone can point out the source of such
> Makefile.PL, maybe this issue can be solved in a more efficient way.

It is an option to generate this as part of './Build dist'.  Patches 
need to go to module-build.

I think it would help a ton if you could create a script (or howto) that 
creates an appropriate simulation environment with debootstrap and 
dchroot (e.g. creates a stock debian etch.)  IIRC, a stock debian etch 
illustrates some of the problem (though perhaps doesn't tickle this 
specific case because their core/site config is more sane than some.)

I'm also curious about how your CPAN got configured with "mbuild_arg" 
and such parameters without installing Module::Build first.  What is 
your 'prefer_installer' set to?

Note that we've been over this compatibility issue multiple times and 
never found an adequate solution that doesn't involve a time machine.  
The new CPAN.pm supports configure_requires, which should eventually 
eliminate this issue, but that means you need the new CPAN.pm, etc.

--Eric
-- 
Those who cannot remember the past are condemned to repeat it.
--George Santayana
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------

Reply via email to