On Nov 5, 2007, at 5:44 PM, John Peacock wrote:

Eric Wilhelm wrote:
I think CPAN has a bug which causes it to pass make_arg to ./Build
install.  (I seem to remember having some grief with -j recently.)

Bug with Module::Build::Compat. See this block from lib/Module/ Build/Base.pm
(line 4287):

  if ($args{makefile_env_macros}) {
    require Module::Build::Compat;
    %args = (%args, Module::Build::Compat->makefile_to_build_macros);
  }

It shouldn't be doing that. makefile_to_build_macros() returns args suitable for the command-line, which might not fit neatly into a hash. For instance, there can be duplicate keys (e.g. -- install_path), in addition to the problem you noticed.

A better band-aid would be this:

===================================================================
--- lib/Module/Build/Compat.pm  (revision 10182)
+++ lib/Module/Build/Compat.pm  (working copy)
@@ -17,7 +17,7 @@
    VERBINST     => 'verbose',
INC => sub { map {('--extra_compiler_flags', $_)} Module::Build->split_like_shell(shift) },
    POLLUTE => sub { ('--extra_compiler_flags', '-DPERL_POLLUTE') },
- INSTALLDIRS => sub {local $_ = shift; 'installdirs=' . (/^perl $/ ? 'core' : $_) }, + INSTALLDIRS => sub {local $_ = shift; ('--installdirs', (/^perl $/ ? 'core' : $_)) },
    LIB => sub { ('--install_path', 'lib='.shift()) },

    # Some names they have in common
===================================================================

 -Ken

Reply via email to