Subject: | Test t/49global_extent.t fails for libxml2 < 2.6.27 - tries to plan twice |
Firstly, thank you for XML::LibXML!
On systems with libxml2 < 2.6.27, the test t/49global_extent.t fails
with:
1..1
You tried to plan twice at t/49global_extent.t line 7.
# Looks like your test exited with 255 before it could output anything.
The below patch resolves this:
+++ t/49global_extent.t 2011-07-07 07:48:49.000000000 -0400
@@ -1,11 +1,16 @@
use strict;
use warnings;
-use Test::More tests => 1;
+use Test::More;
use XML::LibXML;
-if (XML::LibXML::LIBXML_VERSION() < 20627) {
- plan skip_all => "skipping for libxml2 < 2.6.27";
+BEGIN {
+ if (XML::LibXML::LIBXML_VERSION() < 20627) {
+ plan skip_all => "skipping for libxml2 < 2.6.27";
+ }
+ else {
+ plan tests => 1;
+ }
}
sub handler {
Thanks!
Chris