summaryrefslogtreecommitdiff
path: root/make_ext.pl
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2017-10-30 13:37:21 -0700
committerFather Chrysostomos <sprout@cpan.org>2017-10-30 13:38:03 -0700
commit301bcfdaa73a979264d6ee1845c40043ddd464eb (patch)
tree215a946651f6c69833dcfe948abb6d95c8a3754f /make_ext.pl
parentd1f1f359ff734b2a99fa0f1933c26ce5fb2bbb8f (diff)
downloadperl-301bcfdaa73a979264d6ee1845c40043ddd464eb.tar.gz
make_ext.pl: Use version.pm for version cmp
We do a version comparison to determine whether Makefile.PL needs to be run (in case a module version changed). The simple string compar- ison we have done up till now fails if the two version numbers differ simply by a trailing zero (as currently happens with DB_File, which is at version 1.840, with XS_VERSION set to 1.84. Since version.pm’s routines are compiled into miniperl, there is no reason not to do this ‘properly’, and it stops multiple ‘make’ invocations from rebuilding DB_File again, and again....
Diffstat (limited to 'make_ext.pl')
-rw-r--r--make_ext.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/make_ext.pl b/make_ext.pl
index 80d8f68aa3..9bc4718d52 100644
--- a/make_ext.pl
+++ b/make_ext.pl
@@ -303,7 +303,7 @@ sub build_extension {
last unless defined $oldv;
require ExtUtils::MM_Unix;
defined (my $newv = parse_version MM $vmod) or last;
- if ($newv ne $oldv) {
+ if (version->parse($newv) ne $oldv) {
close $mfh or die "close $makefile: $!";
_unlink($makefile);
{