Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 11235
Status: resolved
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: chris+rt [...] chrisdolan.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.051
Fixed in: (no value)



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!",
[CDOLAN - Tue Jan 25 21:03:59 2005]: Show quoted text
> 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!",
Good catch, applied as 11927