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



Subject: Setting $SIG{__DIE__} breaks parse()
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.
Date: Wed, 26 Nov 2003 22:02:52 +0000 (GMT)
From: Ed Avis <ed [...] membled.com>
To: XML-Twig <bug-XML-Twig [...] rt.cpan.org>
Subject: Re: [cpan #4501] AutoReply: Setting $SIG{__DIE__} breaks parse()
RT-Send-Cc:
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>
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?
From: ed [...] membled.com
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.
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.