Subject: | Test suite fails on perl5.12 due to new numeric value warning |
While rebuilding a number of CPAN modules for perl5.12.2, I discovered that XSLoader 0.10 fails
to pass it's test suite, with errors like:
Invalid version format (non-numeric data) at /efs/dist/perl5/core/5.12.2-1.001-
build004/.exec/x86-64.rhel.5/lib/perl5/DynaLoader.pm line 223.
The attached patch simply changes the non-numeric fake value "qunckkk" to "9999.9999", and
the resulting code passes all tests for both perl5.10.1 and 5.12.2, at least on CentOS (although
there's no reason to assume this won't work everywhere).
Subject: | XSLoader-0.10-non-numeric-test-failure.patch |
diff -rc XSLoader-0.10/t/XSLoader.t XSLoader-0.10-non-numeric-test-failure/t/XSLoader.t
*** XSLoader-0.10/t/XSLoader.t 2008-09-23 00:02:44.000000000 -0700
--- XSLoader-0.10-non-numeric-test-failure/t/XSLoader.t 2010-09-14 11:31:17.000000000 -0700
***************
*** 72,81 ****
SKIP: {
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)/",
"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" );
eval qq{ package $module; XSLoader::load('$module'); };
--- 72,81 ----
SKIP: {
skip "$module not available", 4 if $extensions !~ /\b$module\b/;
! eval qq{ package $module; XSLoader::load('$module', "9999.9999"); };
! like( $@, "/^$module object version \\S+ does not match bootstrap parameter (?:9999.9999|0)/",
"calling XSLoader::load() with a XS module and an incorrect version" );
! like( $warnings, "/^\$|^Version string '9999.9999' contains invalid data; ignoring: '9999.9999'/",
"in Perl 5.10, DynaLoader warns about the incorrect version string" );
eval qq{ package $module; XSLoader::load('$module'); };
Only in XSLoader-0.10-non-numeric-test-failure/t: XSLoader.t~