in reply to Re: After compiling a script using PAR::Packer I get the error Can't locate XML/LibXML/SAX.pm in @INC
in thread After compiling a script using PAR::Packer I get the error Can't locate XML/LibXML/SAX.pm in @INC
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(...);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: After compiling a script using PAR::Packer I get the error Can't locate XML/LibXML/SAX.pm in @INC
by Anonymous Monk on May 15, 2015 at 23:18 UTC | |
by ikegami (Patriarch) on May 17, 2015 at 02:08 UTC | |
by Anonymous Monk on May 17, 2015 at 06:09 UTC | |
by ikegami (Patriarch) on May 18, 2015 at 03:51 UTC | |
by Anonymous Monk on May 18, 2015 at 08:03 UTC | |
|