Subject: | Unfortunate name choice |
Linux FC3
perl 5.8.5
XML::Twig 3.22
XML::Parser 2.34
Error message
Not a HASH reference at /usr/lib/perl5/site_perl/5.8.5/XML/Twig.pm line 1769.
I have some code using XML::Twig which has served me well for quite a while
which produced the above error when I recently had to reinstall XML::Twig.
I eventually tracked the problem down to the fact that I had an XML tag with the name of 'level'. Changing this to something else fixed the problem. Tracking down the source has taken me several hours of hair tearing!
The offending code is
my $twig=
new XML::Twig
(TwigRoots =>
{
name => \&save_info,
title => \&save_info,
level => \&save_info,
etc
Thnaks for your work on XML::Twig, I've found it very useful (at least until yesterday ;-) )
Regards
Graham