On Sun, Mar 09, 2008 at 07:12:46PM -0800, Jonathan Leffler wrote:
> Good Evening (well, it was evening when I was writing this),
>
> Having just released a new version of DBD::Informix, I've gotten a couple of
> bug reports from CPAN Testers about not being able to install it - which is
> no vast surprise since those people typically do not have the relevant
> software installed (which, in this case, means IBM Informix ESQL/C).
> However, some of them don't have DBI installed either, and that absence
> causes the Makefile.PL with DBD::Informix to fail.
>
> Questions for you:
>
> 1. Do you have a neat way of avoiding problems with DBI not being
> available, or do you just ignore the reports from CPAN Testers?
I suggest you...
1. Make sure DBI is correctly listed as a dependency, which you have
http://cpandeps.cantrell.org.uk/?module=DBD::Informix;perl=latest
CPAN testers using reasonably upto date versions of the testers tools
should then 'do the right thing'.
2. Add code to Makefile.PL to test for critical dependencies and, if not
found, exit *with a zero status* without creating a Makefile.PL.
3. Do the same if they clearly haven't installed the relevant database
client. For you that would mean warn and exit(0) unless $ENV{INFORMIXDIR}
> 2. Is it me or is it silly that the CPAN Testers requirement for
> 'cannot install the module because the pre-requisites are missing' is to
> exit with a 0 (success) status? It grates horribly on my sense of what is
> appropriate to report a failure as success.
I agree, but it works for those testers using old code.
> 3. Does anyone use ExtUtils::AutoInstall to assist? I've had it in
> DBD::Informix for a while (read several years) but have just done the basic
> testing with a Perl without DBI installed, and ExtUtils::AutoInstall
> doesn't
> seem to help because I 'use DBI::DBD' and 'DBI' in various places.
Automatically installing software grates horribly on my sense of what is
appropriate!
> I'm quite willing to look at your source code so if you have a mechanism in
> place and working -- just tell me which module to download. Or you can
> explain in email with illustrations.
Personally I'd remove ExtUtils::AutoInstall and do the 3 steps above.
> At the moment, to satisfy the CPAN Testers crowd, I think I'd have to have a
> dummy Makefile.PL that (a) arranged to install DBI and then (b) ran more or
> less the current Makefile.PL.
You don't need to do (a). The cpan testers tools should look after
installing dependencies. If they don't it's not your problem, just bail
with a warning and exit 0.
> (Does anyone else get spam in [EMAIL PROTECTED] messages? If so,
> do you just reject them or do you do anything more fanciful with them?)
I get loads on the dbi-faq rt queue, but none for the dbi rt queue.
I'd guess that's because I don't put the rt queue email address in the DBI docs.
Tim.