Link to home
Start Free TrialLog in
Avatar of Kim Ryan
Kim RyanFlag for Australia

asked on

XML::Simple not finding parse method

Just upgraded to Perl 5.8.8. XML::SImple used to parse my file of XML data with no problem. Now get this error,

use XML::Simple;
my $xml_parser = new XML::Simple;
 $out = $xml_parser->XMLin($xml_file_name);

No _parse_* routine defined on this driver (If it is a filter, remember to set the Parent property. If you call the parse() method, make sure to set a Source. You may want to call parse_uri, parse_string or parse_file instead.) [XML::SAX::Expat=HASH(0x826ea44)] at /usr/local/lib/perl5/site_perl/5.8.8/XML/SAX/Base.pm line 2616.

The default parser, XML::SAX::Expat is installed and tested ok.
Avatar of Perl_Diver
Perl_Diver

update your XML::Simple module and see if that helps. Also read the documentation of the newest version of XML::Simple
Avatar of Kim Ryan

ASKER

Am running latest version of XML::Simple. Read through doco.
Thanks mjcoyne, have read the comment. I am not calling parse_file directly, this is done internally bey XML::Simple.. My problem is that XML::Simple used to work fine, but now wont parse anything since I upgraded perl. Have sifted thru module source code, but completely stumped on this one.

(using Linux RH9)
OK, found the error. The shared object Expat.so did not have the right permsissions, along with it's paretn diredtories.

This has caused me other problems. I upgraded my CPAN module and installed several modules with it but the directory permissions are wrong, no read access for 'other'. I used a umask of 002 but  still a problem.

Am happy to raise this as a new question with 500 points if anyone has an idea of what is causing the problem.
> .. did not have the right permsissions, ..
which permissions does it have? what are the permissions of the directory?
it was rwxr----- I think
and is your user, which started the perl script, the same as the owner of the lib (as your permissions request)?
otherwise you need to chmod 444 Expat.so
I found the problem myself, was just a local permision problem. Can I get a points refund?
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It was a local permision problem, as I found for myself. Not the type of problem someone could have picked up without access to my system. Thnaks for all the advice, but I think this is one I solved myself. Would prefer a points refund.