would be more straightforward and less error-prone than$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
$ENV{XML_SIMPLE_PREFERRED_PARSER} = 'XML::Parser';
Whichever method you use, it doesn't need to be done before the module is loaded; just before XMLin is called. Safer:
use XML::Simple qw( XMLin ); sub parse_xml { local $XML::Simple::PREFERRED_PARSER = 'XML::Parser'; return XMLin(@_); } my $xml = parse_xml(...);
In reply to Re^2: After compiling a script using PAR::Packer I get the error Can't locate XML/LibXML/SAX.pm in @INC
by ikegami
in thread After compiling a script using PAR::Packer I get the error Can't locate XML/LibXML/SAX.pm in @INC
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |