Subject: | Zero node value treated as undefined or missing |
Date: | Wed, 10 Apr 2013 16:11:58 +1000 |
To: | "bug-XML-SemanticDiff [...] rt.cpan.org" <bug-XML-SemanticDiff [...] rt.cpan.org> |
From: | Nicholas Phillips <Nicholas.Phillips [...] computershare.com.au> |
I'm not sure if this module is still active, but I found a minor bug.
If a node's text is the value zero, e.g. <weight>0</weight>, it is treated as empty/undefined.
I made a quick fix to my copy as shown below.
In sub Text:
Before: $self->char_accumulator()->{$element} .= $char if $char;
After: $self->char_accumulator()->{$element} .= $char if defined($char);
In sub EndTag:
Before: $text ||= 'o';
After: Removed - the MD5 encode function will treat the undefined string the same as an empty string which is fine for my purposes.
Thanks,
Nick
---
This email may contain confidential information and is for the sole use of the intended recipient(s). Any unauthorized use or disclosure of this communication is prohibited. If you have received this email in error please delete it and notify sender.