Author: dagolden
Date: Mon Jan 18 19:23:42 2010
New Revision: 13742
Modified:
Module-Build/trunk/Changes
Module-Build/trunk/lib/Module/Build/Compat.pm
Log:
fix M::B::Compat dying on dotted-decimal requires->perl
Modified: Module-Build/trunk/Changes
==============================================================================
--- Module-Build/trunk/Changes (original)
+++ Module-Build/trunk/Changes Mon Jan 18 19:23:42 2010
@@ -2,6 +2,14 @@
0.3603 -
+ Bug fixes:
+
+ - Module::Build::Compat would croak on distibutions that set requires
+ 'perl' to a dotted decimal like '5.6.2'. We now skip that key
+ since it doesn't go into PREREQ_PM and we numify it properly for
+ 'use 5.006002' in the generated Makefile.PL (RT#53409)
+ [David Golden, adapted from patch by G. Allen Morris III]
+
0.3602 - Mon Jan 18 22:09:54 EST 2010
Bug fixes:
Modified: Module-Build/trunk/lib/Module/Build/Compat.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Compat.pm (original)
+++ Module-Build/trunk/lib/Module/Build/Compat.pm Mon Jan 18 19:23:42 2010
@@ -10,6 +10,7 @@
use Config;
use Module::Build;
use Module::Build::ModuleInfo;
+use Module::Build::Version;
use Data::Dumper;
my %convert_installdirs = (
@@ -76,6 +77,7 @@
# validate formats
for my $p ( $req, $breq ) {
for my $k (keys %$p) {
+ next if $k eq 'perl';
die "Prereq '$p->{$k}' for '$k' is not supported by
Module::Build::Compat\n"
unless _simple_prereq($p->{$k});
}
@@ -124,7 +126,8 @@
# Makefile.PL
my $requires = $build->requires;
if ( my $minimum_perl = $requires->{perl} ) {
- print {$fh} "require $minimum_perl;\n";
+ my $min_ver = Module::Build::Version->new($minimum_perl)->numify;
+ print {$fh} "require $min_ver;\n";
}
# If a *bundled* custom subclass is being used, make sure we add its