Skip Menu |

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

Report information
The Basics
Id: 21476
Status: resolved
Priority: 0/
Queue: XML-Simple

People
Owner: Nobody in particular
Requestors: kanna [...] fw.jellybean.jp
Cc:
AdminCc:

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



Subject: SuppressEmpty does not work on an undefined value in arrayref.
Date: Thu, 14 Sep 2006 16:38:09 +0900
To: bug-XML-Simple [...] rt.cpan.org
From: "かんな (Kanna)" <kanna [...] fw.jellybean.jp>
Hi, I use XML-Simple-2.14 and have a problem. The sample code below: print XMLout { xml => [undef] }; This prints: <opt> <xml></xml> </opt> It's OK, but adding SuppressEmpty: print XMLout { xml => [undef] }, SuppressEmpty => 1; Also prints: <opt> <xml></xml> </opt> I think this should be <opt></opt> because Show quoted text
> Setting the option to a true value (eg: 1) causes undefined values to
be skipped altogether on output. Is this a bug? Regards.
From: GRANTM [...] cpan.org
On Thu Sep 14 03:38:42 2006, kanna@fw.jellybean.jp wrote: Show quoted text
> Hi, I use XML-Simple-2.14 and have a problem. The sample code below: > > print XMLout { xml => [undef] }; > > This prints: > > <opt> > <xml></xml> > </opt> > > It's OK, but adding SuppressEmpty: > > print XMLout { xml => [undef] }, SuppressEmpty => 1; > > Also prints: > > <opt> > <xml></xml> > </opt> > > I think this should be <opt></opt> because >
> > Setting the option to a true value (eg: 1) causes undefined values to
> be skipped altogether on output. > > Is this a bug? > > Regards.
Yes, it does look like a bug. I release a fix soon. Regards Grant
Fixed in release 2.15 (03-Oct-06)