Subject: | XSLoader breaks with use version 0.81 |
XSLoader will break if someone installs version 0.81 which will probably
shortly be on CPAN after perl 5.12 releases.
This will break some of your tests. I've attached a patch to correct this.
Subject: | XSLoader.patch |
diff --git a/t/XSLoader.t b/t/XSLoader.t
index bce7b0e..eb9b648 100644
--- a/t/XSLoader.t
+++ b/t/XSLoader.t
@@ -9,6 +9,7 @@ BEGIN {
use strict;
use Config;
+use version;
my $db_file;
BEGIN {
@@ -73,8 +74,14 @@ for my $module (sort keys %modules) {
skip "$module not available", 4 if $extensions !~ /\b$module\b/;
eval qq{ package $module; XSLoader::load('$module', "qunckkk"); };
- like( $@, "/^$module object version \\S+ does not match bootstrap parameter (?:qunckkk|0)/",
+ if("$version::VERSION" > 0.80) { # version traps this error message as of 0.81
+ like( $@, qr/^Invalid\sversion\sformat\s\(non-numeric\sdata\)\s/,
"calling XSLoader::load() with a XS module and an incorrect version" );
+ } else {
+ like( $@, "/^$module object version \\S+ does not match bootstrap parameter (?:qunckkk|0)/",
+ "calling XSLoader::load() with a XS module and an incorrect version" );
+ }
+
like( $warnings, "/^\$|^Version string 'qunckkk' contains invalid data; ignoring: 'qunckkk'/",
"in Perl 5.10, DynaLoader warns about the incorrect version string" );