SA Bugzilla – Bug 7143
Evaluate makemaker version using perl best practices
Last modified: 2015-03-10 20:55:10 UTC
As per: http://perldoc.perl.org/perlmodstyle.html#Version-numbering Makefile.PL can be simplified with: --- Makefile.PL.orig 2015-02-20 14:09:08.821327624 -0600 +++ Makefile.PL 2015-02-20 14:09:42.725326495 -0600 @@ -8,12 +8,9 @@ use ExtUtils::MakeMaker; # Store the version for later use -my $mm_version = $ExtUtils::MakeMaker::VERSION; - # avoid stupid 'Argument "6.30_01" isn't numeric in numeric ge (>=)' warnings; # strip off the beta subversion noise that causes the trouble. -$mm_version =~ s/_\S+$//; # "6.30_01" => "6.30" -$mm_version += 0; +my $mm_version = eval $ExtUtils::MakeMaker::VERSION; if ($mm_version < 6.17) { die "SpamAssassin Makefile.PL requires at least ExtUtils::MakeMaker v6.17";
Thanks. I cleaned up removing the one comment that says it strips it off since 6.64_01 becomes 6.6401 with the eval but otherwise looks sound. svn commit -m 'use eval instead of regex to fix MakeMaker version - bug 7143' Makefile.PL Sending Makefile.PL Transmitting file data . Committed revision 1665679.