Apologies for bothering you but I am not sure if this is a bug so did not want to rtpan it.

Between ExtUtils::MakeMaker 6.32 and 6.33 the order that CONFIGURE is run has changed from after PREREQ_PM to before PREREQ_PM. I don't think it can be classed as a bug since the pod does not specifically say CONFIGURE is run after PREREQ_PM. This causes me a problem as I was using a require in CONFIGURE sub which was also in PREREQ_PM so PREREQ_PM would error if the required module was not found (and hence not cause a failure on cpan-testers). Since 6.33 the require in CONFIGURE fails which causes a cpan-testers failure. The thread on cpan-testers-discuss where this came about is:

http://www.mail-archive.com/cpan-testers-discuss%40perl.org/msg00076.html

and my specific code is:

    $opts{PREREQ_PM} = { "DBI" => 1.21 };
    $opts{CONFIGURE} = sub {
        require 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"};
        }
    };
}

My module needs DBI installing first because of the call to dbd_dbi_arch_dir() above which I need to change INC. I was relying on PREREQ_PM failing before CONFIGURE was run.

It would appear I can no longer rely on CONFIGURE being run after PREREQ_PM so I will change my module to require DBI::DBD in an eval and issue a warning and exit 0 if DBD::DBD not found as cpan-testers say this will not cause a failure but I thought you might want to know of this change in MakeMaker.

Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com

Reply via email to