Subject: registering parsers with XML::SAX Perl module
To: None <tech-pkg@NetBSD.org>
From: Klaus Heinz <k.heinz.jun.sieben@kh-22.de>
List: tech-pkg
Date: 06/09/2007 23:50:14
Hi,

p5-XML-SAX uses what I consider a hack and violates abstraction
barriers in order to automatically create the parser registry
PREFIX/lib/perl5/vendor_perl/5.8.0/XML/SAX/ParserDetails.ini:

  .include "../../mk/bsd.prefs.mk"

  .if ${_USE_DESTDIR} != "no"
  INSTALL_ENV+=  PERL5LIB=${DESTDIR}${PERL5_INSTALLVENDORLIB}
  .endif

Without the lines above, the installation fails with

  Can't locate XML/SAX.pm in @INC (@INC contains: ...)

in the DESTDIR case.

IMO, the correct place for this kind of activity would be in
INSTALL/DEINSTALL scripts and since at least p5-XML-LibXML and
p5-XML-SAX-Expat need to install parsers as well I intend to do it the
right way in all those cases.

Objections?

ciao
     Klaus