X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=perl%2FDXXml.pm;h=c29620bbb2cf9a239b1fdb7d86e1a3ce3091f676;hb=2d04aeea02a238550f8a7498a826f910e539caf2;hp=a351510c511f02ca0f8ce450bb3d3906c39f61c1;hpb=84c9ab90dffd89792b08f4adca0f3f43270967a5;p=spider.git diff --git a/perl/DXXml.pm b/perl/DXXml.pm index a351510c..c29620bb 100644 --- a/perl/DXXml.pm +++ b/perl/DXXml.pm @@ -41,11 +41,16 @@ sub init { return unless $main::do_xml; - eval { require XML::Simple; }; - unless ($@) { + eval { require XML::Simple }; + eval { require XML::Parser } unless $@; + if ($@) { + LogDbg('err', "do_xml was set to 1 and the XML routines failed to load ($@)"); + $main::do_xml = 0; + } else { + $XML::Simple::PREFERRED_PARSER = 'XML::Parser'; import XML::Simple; $DXProt::handle_xml = 1; - $xs = new XML::Simple(); + $xs = new XML::Simple(Cache=>[]); } undef $@; }