Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: barbie [...] missbarbell.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.0562
Fixed in: (no value)



Subject: PERL_VERSION_TOO_LOW fix for Module::Build change
Different versions of Module::Build seems to have different strings to identify that the version of Perl is too low to work with the current distribution. Not sure which version of M::B this applies to, but this patch will work with both variations. Patch includes tests.
--- devel/lib/CPANPLUS/Internals/Constants/Report.pm Mon Jul 18 09:52:20 2005 +++ devel-barbie/lib/CPANPLUS/Internals/Constants/Report.pm Fri Oct 21 16:52:34 2005 @@ -121,7 +121,7 @@ } # Module::Build format if( $buffer =~ - /ERROR: perl: Version .*? is installed, but we need version >= .*?/m ) { + /ERROR:( perl:)? Version .*?( of perl)? is installed, but we need version >= .*?/m ) { return 1; } return 0; --- devel/t/40_CPANPLUS-Internals-Report.t Sat Jun 4 15:05:12 2005 +++ devel-barbie/t/40_CPANPLUS-Internals-Report.t Fri Oct 21 17:15:22 2005 @@ -23,11 +23,11 @@ use CPANPLUS::Backend; use CPANPLUS::Internals::Constants::Report; -my $send_tests = 48; +my $send_tests = 55; my $query_tests = 7; my $total_tests = $send_tests + $query_tests; -use Test::More tests => 109; +use Test::More tests => 117; use Module::Load::Conditional qw[can_load]; use FileHandle; @@ -96,8 +96,8 @@ ], check => 0, }, - perl_version_too_low_build => { - buffer => perl_version_too_low_buffer_build(), + perl_version_too_low_build1 => { + buffer => perl_version_too_low_buffer_build(1), failed => 1, match => ['/This distribution has been tested/', '/http://testers.cpan.org//', @@ -105,6 +105,15 @@ ], check => 0, }, + perl_version_too_low_build2 => { + buffer => perl_version_too_low_buffer_build(2), + failed => 1, + match => ['/This distribution has been tested/', + '/http://testers.cpan.org//', + '/NA/', + ], + check => 0, + }, }; @@ -132,8 +141,10 @@ { ok(PERL_VERSION_TOO_LOW->( perl_version_too_low_buffer_mm() ), "Perl version too low" ); - ok(PERL_VERSION_TOO_LOW->( perl_version_too_low_buffer_build() ), + ok(PERL_VERSION_TOO_LOW->( perl_version_too_low_buffer_build(1) ), "Perl version too low" ); + ok(PERL_VERSION_TOO_LOW->( perl_version_too_low_buffer_build(2) ), + "Perl version too low" ); ok(!PERL_VERSION_TOO_LOW->('foo'), " Perl version adequate" ); } @@ -389,12 +400,19 @@ } sub perl_version_too_low_buffer_build { + my $type = shift; return q[ ERROR: perl: Version 5.006001 is installed, but we need version >= 5.008001 ERROR: version: Prerequisite version isn't installed ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation. - ]; + ] if($type == 1); + return q[ +ERROR: Version 5.006001 of perl is installed, but we need version >= 5.008001 +ERROR: version: Prerequisite version isn't installed +ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions + of the modules indicated above before proceeding with this installation. + ] if($type == 2); } # Local variables:
Thanks, applied as 12292