Skip Menu |
 

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

Report information
The Basics
Id: 54634
Status: resolved
Priority: 0/
Queue: XML-Twig

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

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



Subject: uninitialized $prefix on map_xmlns + xml:lang in twig 3.34
Date: Tue, 16 Feb 2010 08:09:02 +1100
To: bug-XML-Twig [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
Download (untitled) / with headers
text/plain 466b
In the debian packaged XML::Twig 3.34 and recent i386 perl 5.10.1, the program foo.pl below prints Use of uninitialized value $prefix in string eq at /usr/share/perl5/XML/Twig.pm line 2074. It seems to be something to do with a combination of xml:lang attribute and a map_xmlns option (whether empty as in foo.pl or with some actual mappings). I'm fairly ignorant of xml so I don't really know if this input is valid, but Twig 3.32 ran it without a warning.
Download foo.pl
text/x-perl 287b
use strict; use warnings; use XML::Twig; my $xml = <<'HERE'; <feed version="0.3" xmlns="http://purl.org/atom/ns\#"> <entry> <title>Item One</title> <content xml:lang="de">Hello</content> </entry> </feed> HERE my $twig = XML::Twig->new (map_xmlns => { }); $twig->parse($xml);
Subject: Re: [rt.cpan.org #54634] uninitialized $prefix on map_xmlns + xml:lang in twig 3.34
Date: Tue, 16 Feb 2010 10:42:50 +0100
To: bug-XML-Twig [...] rt.cpan.org
From: mirod <xmltwig [...] gmail.com>
Kevin Ryde via RT wrote: Show quoted text
> Mon Feb 15 16:10:23 2010: Request 54634 was acted upon. > Transaction: Ticket created by user42@zip.com.au > Queue: XML-Twig > Subject: uninitialized $prefix on map_xmlns + xml:lang in twig 3.34 > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: user42@zip.com.au > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=54634 > > > > In the debian packaged XML::Twig 3.34 and recent i386 perl 5.10.1, the > program foo.pl below prints > > Use of uninitialized value $prefix in string eq at /usr/share/perl5/XML/Twig.pm line 2074. > > It seems to be something to do with a combination of xml:lang attribute > and a map_xmlns option (whether empty as in foo.pl or with some actual > mappings). I'm fairly ignorant of xml so I don't really know if this > input is valid, but Twig 3.32 ran it without a warning.
Thanks, I have a patch for it, I'll put it on xmltwig.com later today, once I have added the tests. Thanks for the report -- mirod


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.