Archive for December, 2010

Perl find location of a library

Friday, December 24th, 2010

If you are not sure of the location of where a library is being included from in Perl you can use the following command:

perl -MXML::SAX -le 'print $INC{"XML/SAX.pm"}'

This search is for the XML::SAX library and it displays the location of the SAX.pm file.

Perl: Missing ParserDetails.ini

Friday, December 24th, 2010

I have some scripts that were giving me the following message:
could not find ParserDetails.ini in /usr/lib/perl5/vendor_perl/5.10/XML/SAX

The way that I worked around this message was to create the ParserDetails.ini file in the /usr/lib/perl5/vendor_perl/5.10/XML/SAX directory with the following contents.

[XML::SAX::PurePerl]
http://xml.org/sax/features/namespaces = 1

Tags: ,