Skip to content

Commit 2dc77ad

Browse files
committed
Carefully compare library version numbers
1 parent b9d4976 commit 2dc77ad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile.PL

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ use File::Path;
1515
use File::Copy;
1616
use File::Basename;
1717
use File::Spec;
18+
use version 0.77;
19+
1820
require DBI::DBD;
1921

2022
my $TESTDB = "test";
@@ -314,6 +316,7 @@ if (eval $ExtUtils::MakeMaker::VERSION >= 5.43) {
314316
'Data::Dumper' => 0,
315317
'Devel::CheckLib' => '1.09',
316318
'ExtUtils::MakeMaker' => 0,
319+
'version' => '0.77',
317320
},
318321
);
319322
}
@@ -447,7 +450,7 @@ sub Configure {
447450
}
448451

449452
if ($param eq 'version') {
450-
if ($str !~ /^[89]\./) {
453+
if (version->parse($str) < version->parse("8.0.0")) {
451454
die "DBD::mysql requires MySQL 8.x or newer for building. Version reported by $command: $str";
452455
}
453456
}

0 commit comments

Comments
 (0)