Ken Williams wrote: >> 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.
Then you shouldn't be assigning makefile_to_build_macros() to a hash in the first place (i.e. it should be @args), or else I'm missing the point. However, your fix is equivalent to mine, in that all of the others qw(DESTDIR PREFIX INSTALL_BASE UNINST) go through this code (lib/Module/Build/Compat.pm line 176): if (exists $makefile_to_build{$key}) { my $trans = $makefile_to_build{$key}; push @out, ref($trans) ? $trans->($val) : ("--$trans", $val); } elsif (exists $Config{lc($key)}) { push @out, '--config', lc($key) . "=$val"; } else { # Assume M::B can handle it in lowercase form push @out, "--\L$key", $val; } which does precisely the same thing (i.e. prepends '--' to the $trans name if it isn't a function. John