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); } makefile_to_build_macros loops through the %ENV variables looking for EU:::MM options and creates an array of name/value pairs. Except for INSTALLDIRS, where it merges the name and the value into a single entry (which is why I was getting the "Odd number of elements in hash" error). This trivial patch fixes the issue and correctly installs the files into the vendor tree instead of site_perl. --- lib/Module/Build/Compat.pm (revision 2147) +++ lib/Module/Build/Compat.pm (local) @@ -17,11 +17,11 @@ 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 - map {$_, lc($_)} qw(DESTDIR PREFIX INSTALL_BASE UNINST), + map {$_, lc($_)} qw(DESTDIR PREFIX INSTALL_BASE UNINST INSTALLDIRS), ); John