Subject: | Missing $type eq INSTALLER_BUILD check in Module.pm |
I found this bug just by code inspection, not by an actual problem, so if I've just misread the code, please accept apologies...
In Module.pm the get_installer_type method decides between Build.PL and Makefile.PL. After choosing, it checks for the presence of Module::Build whether or not Build.PL is preferred. Instead, it should only check and warn if Build.PL is intended.
Patch:
--- CPANPLUS/Module.pm.orig 2005-01-25 19:58:24.000000000 -0600
+++ CPANPLUS/Module.pm 2005-01-25 19:59:16.000000000 -0600
@@ -514,7 +514,8 @@
$type = INSTALLER_MM if $found_makefile && !$found_build;
### ok, so it's a 'build' installer, but you don't /have/ module build
- unless( check_install( module => 'Module::Build' ) ) {
+ if( $type eq INSTALLER_BUILD &&
+ !check_install( module => 'Module::Build' ) ) {
error( loc( "This module requires '%1' to be installed, ".
"but you don't have it! Will fall back to ".
"'%2', but might not be able to install!",