Sixtease has asked for the wisdom of the Perl Monks concerning the following question:

Fellow Perl lovers,

upon trying to install XML::Simple I get the following error message:

Fatal error: Your default XML parser (XML::SAX::PurePerl) is broken. There are known bugs in the PurePerl parser included with version 0. +13 and 0.14 of XML::SAX. The XML::Simple tests will fail with this par +ser. One way to avoid the problem is to install XML::SAX::Expat - it will install itself as the system default XML parser and then you will be + able to install XML::Simple successfully.

The problem is that I do have Expat and LibXML and I can use them okay.

Have a great ($hemisphere eq 'northern' ? 'spring' : '') day!

Replies are listed 'Best First'.
Re: Installing XML::Simple - default SAX parser
by bart (Canon) on Apr 01, 2007 at 11:08 UTC
    You have Expat, and you have LibXML, but do you have XML::SAX::Expat, or do you have whatever may be the equivalent for LibXML? That is/would be an interface layer between the two modules, XML::SAX, and the other one as driver.

    Looking over CPAN, I can't seem to find one for LibXML, but apparently XML::LibXML comes with its own SAX parser: XML::LibXML::SAX.

      Yes, I meant I had XML::SAX::Expat and XML::LibXML::SAX, I should have been more precise.
        Did you run XML::SAX->add_parser, followed by XML::SAX->save_parsers? After that, the newly installed parser(s) should be known permanently.

        By the look of the sourcecode, you must have write access to the directory that the module XML::SAX is installed in. I'd actually expect this to be run while the driver module is being installed.

Re: Installing XML::Simple - default SAX parser
by Sixtease (Friar) on Apr 01, 2007 at 12:25 UTC

    OK I solved it.

    The problem was that I had concurrently installed multiple versions of some modules. Some modules were installed for me and they were placed into site_perl/5.8.8/ but their older versions resided in vendor_perl/5.8.8/ and for some reason, vendor_perl is before site_perl in my @INC (dunno how to change it globally). I simply removed the colliding things from vendor_perl and things are mellow again.

    I actually wrote a little script that checks for such collisions in the two paths. Do you think it's worth posting?

      Do you think it's worth posting?

      Yes. :-)

      HTH,

      planetscape