From: Lukas Mai Date: Sun, 16 Jun 2013 17:27:58 +0000 (+0200) Subject: trim _ from EU:MM->VERSION for version checks X-Git-Tag: v1.0104~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4be55ec6cfb4cce3be9b6e108cbf08d6dc30a997;p=p5sagit%2FFunction-Parameters.git trim _ from EU:MM->VERSION for version checks --- diff --git a/Makefile.PL b/Makefile.PL index fde85e4..456b5ef 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -54,21 +54,23 @@ my %opt = ( }, ); -if (ExtUtils::MakeMaker->VERSION < 6.67_04) { +(my $mm_version = ExtUtils::MakeMaker->VERSION) =~ tr/_//d; + +if ($mm_version < 6.67_04) { # Why? For the glory of satan, of course! no warnings qw(redefine); *ExtUtils::MM_Any::_add_requirements_to_meta_v1_4 = \&ExtUtils::MM_Any::_add_requirements_to_meta_v2; } -if (ExtUtils::MakeMaker->VERSION < 6.63_03) { +if ($mm_version < 6.63_03) { merge_key_into \%opt, 'BUILD_REQUIRES', 'TEST_REQUIRES'; } -if (ExtUtils::MakeMaker->VERSION < 6.55_01) { +if ($mm_version < 6.55_01) { merge_key_into \%opt, 'CONFIGURE_REQUIRES', 'BUILD_REQUIRES'; } -if (ExtUtils::MakeMaker->VERSION < 6.51_03) { +if ($mm_version < 6.51_03) { merge_key_into \%opt, 'PREREQ_PM', 'CONFIGURE_REQUIRES'; }