Skip Menu |
 

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

Report information
The Basics
Id: 644
Status: resolved
Priority: 0/
Queue: XML-XPath

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.12
Fixed in: (no value)



Download (untitled) / with headers
text/plain 731b
According to the XML::XPath manpage, findvalue returns an XML::XPath::Literal or other object, but I've found that it sometimes returns a plain string. For instance $obj->findvalue('//myname') will return a string, but $obj->findvalue('normalize-space(//myname)') will return a Literal. This means that in some cases we can call string_value on the returned object, and sometimes we can't. I think findvalue should always return an object and never a plain string, and getNodeText (which returns plain strings) should be allowed on all objects that findvalue is valid on, like XML::XPath::Node::Element objects for instance.... Or, make findvalue always return plain strings. The point is that what it returns should be consistent
Fixed in CVS.


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.