Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix M::B::Compat dying on dotted-decimal requires->perl

git-svn-id: http://svn.perl.org/modules/Module-Build/trunk@13742 50811bd7-b8ce-0310-adc1-d9db26280581
  • Loading branch information...
commit 6f40817b1a3312177cf6ebb10897f5374aaf6a5b 1 parent 16fda3a
@dagolden dagolden authored
Showing with 12 additions and 1 deletion.
  1. +8 −0 Changes
  2. +4 −1 lib/Module/Build/Compat.pm
View
8 Changes
@@ -2,6 +2,14 @@ Revision history for Perl extension Module::Build.
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:
View
5 lib/Module/Build/Compat.pm
@@ -10,6 +10,7 @@ use IO::File;
use Config;
use Module::Build;
use Module::Build::ModuleInfo;
+use Module::Build::Version;
use Data::Dumper;
my %convert_installdirs = (
@@ -76,6 +77,7 @@ sub _merge_prereq {
# 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 @@ HERE
# 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
Please sign in to comment.
Something went wrong with that request. Please try again.