Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: jfeng [...] gmx.net
Cc:
AdminCc:

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



Subject: Error in parsing predicate-expression
While the following oneliner prints a corect result C:\TEMP>perl -MXML::XPath -e "my $xp=XML::XPath->new(xml=>'<a/>'); for (-3..3) {print $xp->find(qq{//*[$_=2]})->size()}" 0000010 changing the sign of 2 (or replacing 2 by 0) reveals a bug: C:\TEMP>perl -MXML::XPath -e "my $xp=XML::XPath->new(xml=>'<a/>'); for (-3..3) {print $xp->find(qq{//*[$_=-2]})->size()}" 1111000 C:\TEMP>perl -MXML::XPath -e "my $xp=XML::XPath->new(xml=>'<a/>'); for (-3..3) {print $xp->find(qq{//*[0=$_]})->size()}" 1111000 I would expected '0100000' and '0001000' as the result, respectively (that is also the result of XMLSpy 4.4 and WebSphere Studio 4.02). Relevant Modules: XML::XPath 1.12, XML::Parser 2.29 Perl-Version: 5.005_03 for MSWin32-x86-object (ActivePerl build 522)
A bug in Number.pm where it wouldn't let you construct a negative number. Fixed in CVS. Thanks for the report, and sorry for the delay.