Subject: | XML::SAX::Expat::Incremental should not install itself as default SAX parser |
This idea of this module seems very useful, however since the module does not implement the full SAX API, it should not register itself in ParserDetails.ini. The current install script breaks all scripts on the target machine which use SAX.
The attached simple test script works with any SAX parser. It no longer works after XML::SAX::Expat::Incremental has been installed.
The simplest solution is to not register with ParserDetails.ini at all. A more complex solution would be to re-arrange the entries after registering so that XML::SAX::Expat::Incremental is not the last (default) entry.
#!/usr/bin/perl -w
use strict;
use XML::SAX::ParserFactory;
use XML::SAX::Writer;
my $h = XML::SAX::Writer->new;
my $p = XML::SAX::ParserFactory->parser(Handler => $h);
$p->parse_file(\*DATA);
__DATA__
<people>
<person>Jack</person>
<person>Jill</person>
</people>