Subject: | Fails CPAN.pm install when neither XML::SAX nor XML::Parser are present |
CPAN.pm won't install XML::Simple onto a system without either XML::SAX or XML::Parser. It fails silently - the print()s in Makefile.PL are filtered by CPAN.pm - preventing the user from seeing them.
Recommend you try something like the following in Makefile.PL:
if ( eval { require XML::Parser } && $@ == 0 ) {
WriteMakefile( PREREQ_PM => { XML::Parser => 0, XML::NamespaceSupport => 1.04 }, ... );
} elsif ( eval { require XML::SAX } && $@ == 0 ) {
WriteMakefile( PREREQ_PM => { XML::SAX => 0, XML::NamespaceSupport => 1.04 }, ... );
} else {
# XML::Parser or XML::SAX? You decide.
WriteMakefile( PREREQ_PM => { XML::Parser => 0, XML::NamespaceSupport => 1.04 }, ... );
}
Thanks - let me know if you need more detail,
Joshua