Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: ed [...] membled.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 3.09
  • 3.11
Fixed in: 3.11



Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.405 (Entity 5.404)
Subject: Setting $SIG{__DIE__} breaks parse()
X-RT-Original-Encoding: iso-8859-1
Content-Length: 652
Download (untitled) / with headers
text/plain 652b
use XML::Twig; local $SIG{__DIE__} = sub { my $msg = shift; print STDERR "dying! $msg\n"; exit 1; }; new XML::Twig()->parse('<a />'); dies with the error dying! Can't use string ("<a />") as a symbol ref while "strict refs" in use at /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/XML/Parser/Expat.pm line 456. As far as I know this is a minimal test case. I can reproduce it with perl 5.8.0 and 5.8.2, XML::Twig 3.09 and 3.11. Can you reproduce it? It looks like it could be a bug in XML::Parser or perl, but having narrowed it down this far I thought I should contact you first of all.
Return-Path: <ed [...] membled.com>
Delivered-To: cpan-bug+xml-twig [...] pallas.eruditorum.org
Received: from budvar.future-i.net (budvar.future-i.net [212.100.224.95]) by pallas.eruditorum.org (Postfix) with SMTP id 99AF011452 for <bug-XML-Twig [...] rt.cpan.org>; Wed, 26 Nov 2003 17:08:49 -0500 (EST)
Received: (qmail 10355 invoked by uid 538); 26 Nov 2003 22:02:52 -0000
Received: from localhost (sendmail-bs [...] 127.0.0.1) by localhost with SMTP; 26 Nov 2003 22:02:52 -0000
Date: Wed, 26 Nov 2003 22:02:52 +0000 (GMT)
From: Ed Avis <ed [...] membled.com>
X-Sender: ed [...] budvar.future-i.net
To: XML-Twig <bug-XML-Twig [...] rt.cpan.org>
Subject: Re: [cpan #4501] AutoReply: Setting $SIG{__DIE__} breaks parse()
In-Reply-To: <rt-4501-13219.14.1187964026195 [...] cpan.org>
Message-Id: <Pine.LNX.4.20L2.0311262200430.18313-100000 [...] budvar.future-i.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
RT-Send-Cc:
X-RT-Original-Encoding: us-ascii
Content-Length: 416
Download (untitled) / with headers
text/plain 416b
After some more investigation I narrowed this bug down to use XML::Parser; local $SIG{__DIE__} = sub { my $msg = shift; print STDERR "dying! $msg\n"; exit 1; }; new XML::Parser()->parse('<a />'); So it is not an XML::Twig bug except in so far as XML::Twig is built on XML::Parser. The good news is that this seems to be fixed with XML::Parser 2.34. -- Ed Avis <ed@membled.com>
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.405 (Entity 5.404)
X-RT-Original-Encoding: iso-8859-1
Content-Length: 568
Download (untitled) / with headers
text/plain 568b
[ed@membled.com - Wed Nov 26 17:09:24 2003]: Show quoted text
> After some more investigation I narrowed this bug down to > > use XML::Parser; > local $SIG{__DIE__} = sub { > my $msg = shift; > print STDERR "dying! $msg\n"; exit 1; > }; > new XML::Parser()->parse('<a />'); > > So it is not an XML::Twig bug except in so far as XML::Twig is built > on XML::Parser. > > The good news is that this seems to be fixed with XML::Parser 2.34.
This is a good thing, as I was not able to reproduce the bug (I use XML::Parser 2.34). Can I close the bug?
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.405 (Entity 5.404)
From: ed [...] membled.com
X-RT-Original-Encoding: iso-8859-1
Content-Length: 448
Download (untitled) / with headers
text/plain 448b
If you feel that this is morally a bug in XML::Twig as well as XML::Parser (even though the XML::Twig code itself is not at fault) then you could make XML::Twig require XML::Parser-2.34 or later. If this is the version you develop with, then there is some sense in doing that anyway. If you think that there is no bug in XML::Twig (even though I was able to reproduce the problem with a script that uses only XML::Twig) then please close the bug.
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.405 (Entity 5.404)
X-RT-Original-Encoding: iso-8859-1
Content-Length: 296
Download (untitled) / with headers
text/plain 296b
[guest - Mon Dec 1 08:20:11 2003]: Show quoted text
> If you think that there is no bug in XML::Twig (even though I was able > to reproduce the problem with a script that uses only XML::Twig) then > please close the bug.
I added an entry in the FAQ at http://xmltwig.com/xmltwig/XML-Twig-FAQ.html#Q15 __ 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.