Greg Sabino Mullane wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
1. do not "use DBI" or "use DBI::DBD" because this will cause an
immediate failure if DBI is not installed and now be reported as a failure.
...
$opts{CONFIGURE} = sub {
use DBI::DBD;
Does this work for you? I cannot see how it would.
Yes it does, why do you think it won't?
PREREQ_PM => {"DBI" => 1.21 }
ensures we have at least DBI but MakeMaker is checking not us and hence
cpan testers are ok with it because it is a recognised failure.
$opts{CONFIGURE} = sub {
use DBI::DBD;
my $dbi_arch_dir = dbd_dbi_arch_dir();
if (exists($opts{INC})) {
return {INC => "$opts{INC} -I$dbi_arch_dir"};
} else {
return {INC => "-I$dbi_arch_dir"};
}
};
Adds the dbd_dbi_arch_dir() to include path. DBI is not used anywhere
else in the Makefile.PL for DBD::ODBC. As CONFIGURE only gets run after
the PREREQ_PM check all is ok.
I ended up using a
require/eval block and doing the exit 0 you mentioned elsewhere if it fails.
I believe that is an acceptable way of doing it also.
Out of interest, what version of MakeMaker are you using?
Thanks for your work on this, I've implemented the rest of your suggestions
for DBD::Pg and hope to see less false test failures in the next release! :)
If you do see any problems I have found the people on the
cpan-testers-discuss list very helpful and obviously report anything
useful back here.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com