Just stuff it in t/conf/modperl_extra_startup.pl

IIRC, this doesn't work because extra.conf.in is sucked in via Include before the startup - if extra.conf.in uses PerlModule (which is required for 1.0 custom directives) then it's too late. but again, I already have a workaround - I just think it should be easier and more DWIMmy.

Geoff, please check if this works for you:


use Cwd;
use File::Spec::Functions;
my $blib_path = catdir Cwd::cwd(), "blib";
my $blib_code = "use blib qw($blib_path);";
if ($mp_version == 1) {
    $blib_code .= "\n";
}
else {
    $blib_code .= "\nuse Apache2;\n";
}

if (eval {require Apache::TestMM}) {
    Apache::TestMM->import(qw(test clean));
    my @scripts = qw(t/TEST);
    # accept the configs from command line
    Apache::TestMM::filter_args();
    Apache::TestMM::generate_script('t/TEST');

    my $blib = "t/conf/blib.pl.in";
    open EXTRA,  ">$blib"  or die "can't open $blib: $!";
    print EXTRA $blib_code;
    print EXTRA "1;";
    close EXTRA;
}

seems to work fine here. I suppose that this can be wrapped into Apache::Test function which will be explicitly invoked from Makefile.PL, we will see. I'll play some more with it later.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


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



Reply via email to