On 2011.12.14 1:13 AM, Martin Becker wrote: > This error message looks like coming from Module::Build, > not ExtUtils::MakeMaker.
Nice catch. > Since you are using the cpan tool, you might want to review > your CPAN settings. Try the ``o conf'' command from your CPAN > shell and check for path names there. > > Module::Build has quite a number of options controlling where > to install things. In your situation, probably --prefix would > work with least surprising results; it was designed aiming for > compatibility with EUMM's PREFIX argument. > > To arrange for cpan calling ./Build with a --prefix argument, > you could enter ``o conf mbuildpl_arg --prefix ~/perl'' in your > CPAN shell. The EUMM equivalent would be ``o conf makepl_arg > PREFIX=~/perl''. Likely what's happening here is the CPAN shell is set to prefer the Makefile.PL when it sees both a Makefile.PL and a Build.PL. This means you're using Module::Build's MakeMaker emulation layer which doesn't always work. There's no reason to use that any more. Setting "o conf prefer_installer MB" in the CPAN shell should solve the problem, in addition to the settings Martin mentioned above. You'll also want to wean yourself away from using PREFIX. It is hard to predict, and MakeMaker and Module::Build don't always do it the same. MakeMaker has INSTALL_BASE and Module::Build has --install_base which are far simpler. local::lib can take care of setting them up. The down side is if you're already using PREFIX, INSTALL_BASE will install to different locations, so you'll have to move your Perl libraries. -- package Outer::Space; use Test::More tests => 9;