Subject: | DBM::Deep breaks XML::Twig |
Loading DBM::Deep in a program that uses XML::Twig produces the
following fatal error:
Can't locate object method "read" via package "FileHandle" at
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/XML/Parser/Expat.pm
line 469
Uncomment the line 'use DBM::Deep;' in the attached program to reproduce.
Versions -
Perl : 5.8.8
OS : CentOS 5
XML::Twig : 3.29
XML::Parser::Expat : 2.36
Subject: | twigtest.pl |
#!/bin/env perl
use strict;
use warnings;
#use DBM::Deep;
use XML::Twig;
my $twig = XML::Twig->new(
twig_handlers => {
server => \&parse_data,
}
);
$twig->parse(*DATA);
sub parse_data {
my($t, $tag) = @_;
print $tag->att('name') . "\n";
}
__DATA__
<config logdir="/var/log/foo/" debugfile="/tmp/foo.debug">
<server name="sahara" osname="solaris" osversion="2.6">
<address>10.0.0.101</address>
<address>10.0.1.101</address>
</server>
<server name="gobi" osname="irix" osversion="6.5">
<address>10.0.0.102</address>
</server>
<server name="kalahari" osname="linux" osversion="2.0.34">
<address>10.0.0.103</address>
<address>10.0.1.103</address>
</server>
</config>