Subject: | tests fail if XML::LibXML is not installed |
Date: | Wed, 22 May 2013 14:58:40 +0200 |
To: | bug-Config-Any [...] rt.cpan.org |
From: | Moritz Bunkus <moritz [...] bunkus.org> |
Hey,
two tests fail with an exception if XML::LibXML is not installed at all:
t/20-parse.t .......... Error parsing t/conf/conf.xml: Can't locate
XML/LibXML/SAX.pm in @INC (@INC contains:
/home/mbunkus/build/mosu/maintained/perl-config-any/src/Config-Any-0.23/inc
/home/mbunkus/build/mosu/maintained/perl-config-any/src/Config-Any-0.23/blib/lib
/home/mbunkus/build/mosu/maintained/perl-config-any/src/Config-Any-0.23/blib/arch
/usr/lib/perl5/site_perl /usr/share/perl5/site_perl
/usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl
/usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at (eval 34)
line 1.
at t/20-parse.t line 42.
# Looks like your test exited with 2 before it could output anything.
t/20-parse.t .......... Dubious, test returned 2 (wstat 512, 0x200)
and
t/54-xml.t ............ Can't locate XML/LibXML/SAX.pm in @INC (@INC
contains: /home/mbunkus/build/mosu/maintained/perl-config-any/src/Config-Any-0.23/inc
/home/mbunkus/build/mosu/maintained/perl-config-any/src/Config-Any-0.23/blib/lib
/home/mbunkus/build/mosu/maintained/perl-config-any/src/Config-Any-0.23/blib/arch
/usr/lib/perl5/site_perl /usr/share/perl5/site_perl
/usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl
/usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at (eval 7)
line 1.
# Looks like your test exited with 2 before it could output anything.
t/54-xml.t ............ Dubious, test returned 2 (wstat 512, 0x200)
Failed 6/6 subtests
For 54-xml.t I can already see a logic error:
my $broken_libxml
= eval { require XML::LibXML; XML::LibXML->VERSION lt '1.59'; };
skip 'XML::LibXML < 1.58 has issues', 2 if $broken_libxml;
Now if the require aborts eval returns falsish and "skip" is not executed.
I haven't looked into 20-parse.t yet.
Note that I do have XML::Simple and XML::NamespaceSupport installed,
and "use"ing both works just fine (from looking at Config/Any/XML.pm).
Maybe you should simply mention XML::LibXML as a build pre-requisite.
Kind regards,
mosu