could not find ParserDetails.ini in /reports/ie/lib/cpan/XML/SAX
at /reports/ie/lib/cpan/XML/SAX.pm line 212
XML::SAX::do_warn('XML::SAX', 'could not find ParserDetails.ini in /reports/ie/lib/cpan/XML/...') called at /reports/ie/lib/cpan/XML/SAX.pm line 62
XML::SAX::load_parsers('XML::SAX') called at /reports/ie/lib/cpan/XML/SAX.pm line 115
XML::SAX::parsers('XML::SAX') called at /reports/ie/lib/cpan/XML/SAX/ParserFactory.pm line 18
XML::SAX::ParserFactory::new('XML::SAX::ParserFactory') called at /reports/ie/lib/cpan/XML/SAX/ParserFactory.pm line 26
XML::SAX::ParserFactory::parser('XML::SAX::ParserFactory', 'Handler', 'XML::Simple=HASH(0x162c6e30)') called at /reports/ie/lib/cpan/XML/Simple.pm line 358
XML::Simple::build_tree('XML::Simple=HASH(0x162c6e30)', 'changelog.xml', 'undef') called at /reports/ie/lib/cpan/XML/Simple.pm line 308
XML::Simple::build_simple_tree('XML::Simple=HASH(0x162c6e30)', 'changelog.xml', 'undef') called at /reports/ie/lib/cpan/XML/Simple.pm line 227
XML::Simple::parse_file('XML::Simple=HASH(0x162c6e30)', 'changelog.xml') called at /reports/ie/lib/cpan/XML/Simple.pm line 195
XML::Simple::XMLin('XML::Simple=HASH(0x162c6e30)', 'changelog.xml') called at perlXML_test.pl line 11
1 回答
It's a warning saying you don't have any SAX parser for XML::SAX to use except the slow and buggy XML::SAX::PurePerl.
Installing a parser for XML::SAX will update the file, creating it if necessary.
cpan XML::LibXML::SAX
You could also tell XML::Simple to use XML::Parser instead of XML::SAX.
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
Setting environment variable XML_SIMPLE_PREFERRED_PARSER
to the same value will have the same effect.
XML::Parser is much faster backend than any of the XML::SAX parsers that exited when I did benchmarks a couple of years ago. It doesn't handle namespaces, though.
Personally, I'd avoid XML::Simple. It's the hardest XML parser to use correctly. I use XML::LibXML.