Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

tomhukins (4457)

tomhukins
  (email not shown publicly)

Perl, Web, Database developer, and Milton Keynes Perl Monger [pm.org].

Journal of tomhukins (4457)

Friday June 09, 2006
09:06 AM

Stopping PPM SAX Warnings

[ #29857 ]

For my sins, I look after ActivePerl installations on several Windows machines including my desktop machine at work. If you don't sin enough to use Windows, the following won't interest you much.

Read on if you use PPM and regularly encounter error messages like:

Unable to recognise encoding of this document at C:/Perl/site/lib/XML/SAX/PurePerl/EncodingDetect.pm line 96, line 251.
Unable to recognise encoding of this document at C:/Perl/site/lib/XML/SAX/PurePerl/EncodingDetect.pm line 96, line 265.
Unable to recognise encoding of this document at C:/Perl/site/lib/XML/SAX/PurePerl/EncodingDetect.pm line 96, line 274.
Unable to recognise encoding of this document at C:/Perl/site/lib/XML/SAX/PurePerl/EncodingDetect.pm line 96, line 279.
Unable to recognise encoding of this document at C:/Perl/site/lib/XML/SAX/PurePerl/EncodingDetect.pm line 96, line 287.

Version 0.13 of XML::SAX introduced a rewrite of the pure Perl SAX parser. This parser has behaved awkwardly for a few people: I've noticed it when using PPM on machines with XML::SAX::Writer installed.

After a quick nose through the documentation for XML::SAX::ParserFactory, I installed XML::SAX::Expat through PPM. I then taught XML::SAX to use this parser instead of the whingeing XML::SAX::PurePerl parser by putting the following line in C:\Perl\site\lib\SAX.ini:

ParserPackage = XML::SAX::Expat

PPM now complained about a missing ParserDetails.ini, so I created an empty file at C:\Perl\site\lib\XML\SAX\ParserDetails.ini.

I feel a little guilty about avoiding the problem with a quick hack rather than creating an elegant solution. On the other hand, PPM doesn't spew errors out at me, so I laze around in the sun drinking. Errrr, I mean get on with other mission critical business tasks...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.