Philip M. Gollucci wrote:
Fred Moyer wrote:
http://people.apache.org/~phred/Apache-Bootstrap-0.02.tar.gz

As I tested this out with Apache::Dispatch today, I came to the realization that Apache::Bootstrap itself must be bootstrapped in the Makefile.PL. Here's how I did it in Apache::Dispatch, parts ripped off from ExtUtil::MakeMaker. I'm still fuzzy on the details of how not to cause CPAN testers failures.

Any thoughts here welcome - still bootstrapping this (no pun intended :)

BEGIN {
    my $AB_VER = 0.02;
my $fail_msg = "Warning: prerequisite Apache::Bootstrap $AB_VER not found.";

    eval { require Apache::Bootstrap };
    die $fail_msg . "\n" if $@;

    die $fail_msg . " We have $Apache::Bootstrap::VERSION.\n"
        if $Apache::Bootstrap::VERSION < $AB_VER;
}

... some code

my $mp_gen = Apache::Bootstrap->satisfy_mp_generation(2);
I haven't read the code more than you put here, but this doesn't seem quite right. It seems cyclic. I know perl is one of those languages that let you get away with it if you are clever, but I don't know many cases where its right idea....

Bootstrapping is cyclic to some degree, but I don't think this code is quite where I want it to be. I have my head fairly well wrapped around most of the issues now. This module is really intended to provide information about existing mod_perl and apache::test installs so that the build program (Makefile.PL) can make decisions on whether to use ExtUtils::MakeMaker (mp1) vs ModPerl::MM (mp2).

I think for simplicity the bootstrapping stuff should remain thin. I looked at some of the CPAN tester failures for my modules, and I am following the path of making build failures due to dependencies result in NA cpan tester report, vs fail. If the dependencies aren't installed, the test should not be run the result should be NA as opposed to Fail. If you want to see details of what I mean, go find the test results for RHP::Timer on cpan testers and you'll see NA entries where the required version of perl is not installed, as opposed to Fail.

I'm going to make another iteration and have the bootstrap process fail at compile time if it cannot find any mod_perl installation, just like build will fail if the required version of perl cannot be found. Without a mod_perl install, we should assume the module cannot be built. Does that sound like a good assumption?

I haven't done any of the work though, so I'll defer to you unless I get my act in gear.

Thanks for the feedback, it is helpful. If this works, it should make shipping dual life modules fairly painless (crosses fingers).

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to