Skip Menu |

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

Report information
The Basics
Id: 20896
Status: resolved
Priority: 0/
Queue: XML-XSH2

People
Owner: Nobody in particular
Requestors: tatu [...] tajuma.com
Cc:
AdminCc:

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



Subject: buf attribute insert parsing
Date: Tue, 8 Aug 2006 09:10:45 -0700 (PDT)
To: bug-XML-XSH2 [...] rt.cpan.org
From: tatu [...] tajuma.com
Hello, There is a bug in XSH2 when parsing attribute string in insert command. It causes an infinite loop of "ignoring characters" messages scrolling down the screen. Here is how to reproduce: $scratch> create e /> insert attribute "foo=" into e (Ctrl-C to get out), or /> $value = "" /> insert attribute { "foo=$value" } into e Running version 2.0.2/0.12 (Revision: 2.2). A quick fix for this is like, maybe a proper error message or treating the missing value as "" would be more approriate. --- Functions.pm.orig 2006-08-08 19:05:39.000000000 +0300 +++ Functions.pm 2006-08-08 19:06:14.000000000 +0300 @@ -3185,6 +3185,7 @@ } } else { $str=~/\G(\S*\s*)/gsco; + last if $1 == ""; print STDERR "ignoring characters $1\n"; } } Cheers, tatu
You are right in both points: - foo= should create an empty attribute (like foo='') - tokens that can't be parsed should be reported as errors I addressed both of these problems in the CVS. Thanks, -- Petr