Skip Menu |
 

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 75195
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: paul [...] city-fan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.91
Fixed in: (no value)

Attachments


Subject: t/72destruction.t fails with Perl < 5.10
Download (untitled) / with headers
text/plain 593b
Fails like this: t/72destruction.....................Can't call method "attributes" on an undefined value at /builddir/build/BUILD/XML-LibXML-1.91/blib/lib/XML/LibXML/AttributeHash.pm line 43. # Looks like your test died before it could output anything. dubious Test returned status 9 (wstat 2304, 0x900) Scalar found where operator expected at (eval 152) line 1, near "'int' $__val" (Missing operator before $__val?) DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay Attached patch fixes this for me but I expect you can probably come up with a neater solution ;-)
Subject: XML-LibXML-1.91-72destruction.patch
t/72destruction.....................Can't call method "attributes" on an undefined value at /builddir/build/BUILD/XML-LibXML-1.91/blib/lib/XML/LibXML/AttributeHash.pm line 43. # Looks like your test died before it could output anything. dubious Test returned status 9 (wstat 2304, 0x900) Scalar found where operator expected at (eval 152) line 1, near "'int' $__val" (Missing operator before $__val?) DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay --- XML-LibXML/lib/XML/LibXML/AttributeHash.pm +++ XML-LibXML/lib/XML/LibXML/AttributeHash.pm @@ -40,11 +40,14 @@ sub all_keys { my ($self, @keys) = @_; - foreach ($self->element->attributes) + if (defined ($self->element) and defined ($self->element->attributes)) { - if (! $_->isa('XML::LibXML::Namespace')) + foreach ($self->element->attributes) { - push @keys, $self->to_clark($_->namespaceURI, $_->localname); + if (! $_->isa('XML::LibXML::Namespace')) + { + push @keys, $self->to_clark($_->namespaceURI, $_->localname); + } } } return sort @keys;
From: paul [...] city-fan.org
Download (untitled) / with headers
text/plain 1012b
Even with the patch, I'm getting a failure on Perl 5.8.0 but only on x86_64: ... t/60struct_error....................ok t/61error...........................ok t/71overloads.......................ok t/72destruction.....................dubious Test returned status 0 (wstat 139, 0x8b) Scalar found where operator expected at (eval 153) line 1, near "'int' $__val" (Missing operator before $__val?) after all the subtests completed successfully t/80registryleak....................ok t/90threads.........................skipped all skipped: optional (set THREAD_TEST=1 to run these tests) t/pod...............................ok Failed 1/54 test scripts, 98.15% okay. 0/2379 subtests failed, 100.00% okay. Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/72destruction.t 0 139 1 0 0.00% ?? 3 tests skipped. An i386 build still passes. It was working with 1.90 though.
Download (untitled) / with headers
text/plain 300b
Thanks for the report. I was able to reproduce it with perl-5.8.9 here and wrote a similar fix (though not identical). Regarding the failure with perl-5.8.0 - we don't support such versions as there is already perl-5.8.9, and one day we might require only perl-5.10.x and above (or even above that).


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.