Subject: | Setting $SIG{__DIE__} breaks parse() |
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.