Skip to content

Commit 58bba59

Browse files
committed
Carefully compare library version numbers
1 parent b9d4976 commit 58bba59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile.PL

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use File::Path;
1515
use File::Copy;
1616
use File::Basename;
1717
use File::Spec;
18+
use version 0.77;
1819
require DBI::DBD;
1920

2021
my $TESTDB = "test";
@@ -314,6 +315,7 @@ if (eval $ExtUtils::MakeMaker::VERSION >= 5.43) {
314315
'Data::Dumper' => 0,
315316
'Devel::CheckLib' => '1.09',
316317
'ExtUtils::MakeMaker' => 0,
318+
'version' => '0.77',
317319
},
318320
);
319321
}
@@ -447,7 +449,7 @@ sub Configure {
447449
}
448450

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

0 commit comments

Comments
 (0)