XML-LibXMLのインストール

ppmで、XML-LibXMLをインストールしようとすると、事前にXML-SAXをインストール
することになる。その際に、以下のメッセージ:

"could not find ParserDetails.ini"

が表示される場合は、以下のページを参照する。

http://perl-xml.sourceforge.net/faq/

※該当箇所を抜き出した。

3.16. "could not find ParserDetails.ini"

A number of people have reported encountering the error "could not find ParserDetails.ini in ..." when installing or attempting to use XML::SAX. ParserDetails.ini is used by XML::SAX::ParserFactory to determine which SAX parser modules are installed. It should be created by the XML::SAX installation script and should be updated automatically by the install script for each SAX parser module.

*

If you are installing XML::SAX manually you must run Makefile.PL. Unpacking the tarball and copying the files into your Perl lib directory will not work.
*

During the initial installation, if you are asked whether ParserDetails.ini should be updated, always say yes. If you say no, the file will not be created.
*

If you are using ActivePerl, the following command should resolve the problem:

ppm install http://theoryx5.uwinnipeg.ca/ppms/XML-SAX.ppd

Once you have successfully installed XML::SAX, you should consider installing a module such as XML::SAX::Expat or XML::LibXML to replace the slower pure-Perl parser bundled with SAX.

If you are packaging XML::SAX in an alternative distribution format (such as RPM), your post-install script should check if ParserDetails.ini exists and if it doesn't, run this command:

perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()"

Don't unconditionally run this command, or users who re-install XML::SAX may find that any fast SAX parser they have installed will be replaced as the default by the pure-Perl parser.

ところで、上記のモジュールをインストールすると、以下のようにXML-SimpleのSAXパーサーを明示的に指定する必要が出てくる(?)

$XML::Simple::PREFERRED_PARSER = 'XML::LibXML::SAX';

http://d.hatena.ne.jp/naoya/20050801/1122884138 を参照