Subject: | The attributes method of an XML::LibXML::Text node in list context wrongly returns (undef) |
Date: | Sat, 27 Feb 2016 08:58:32 +0000 |
To: | bug-XML-LibXML [...] rt.cpan.org |
From: | Rob Dixon <the.rob.dixon [...] gmail.com> |
A call like
my @attr = $node->attributes
will set `@attr` to contain a single element with the value `undef`. This
should be an empty list.
The fix is simple. The method, on line 1778 of LibXML.pm, should be changed
from
sub attributes { return undef; }
to
sub attributes { return }
Thanks,
Rob Dixon
Norfolk
England