now I use:
PerlSwitches [EMAIL PROTECTED]@/../blib -MApache2
yeah, that's a nice way to do it with 2.0
I'm not quite sure why this should be an Apache::Test responsibility?
well, Apache::Test already adds a bunch of libraries via modperl_startup.pl (or whatever the generated one is), and by default build libraries are put into blib, so I don't see why I need to do this myself.
I need to check. That should be optional, since blib croaks if it doesn't find blib, and in cases where Apache::Test is used for things which aren't perl (e.g. while testing httpd) there is no blib.
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.
We definitely want DWIM.
I'm working on something like the following, need to polish it though. Unrelated to the blib issue I want a nice fallback in the case Apache::Test is not available. I haven't tested the blib part of the code yet, probably will have the issues you have mentioned above.
my $blib_code = '';
if ($mp_version == 1) {
$blib_code = "use blib;\n";
}
else {
$blib_code = "use blib;\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;
}
else {
warn "***: You should install Apache::Test to do real testing\n";
my $test = "t/TEST";
unlink $test;
open TEST, ">$test" or die "can't open $test: $!";
print TEST <<EOF;
BEGIN { print "0..1\\n" };
$blib_code
require Apache::Peek;
print "ok 1\\n";
EOF
close TEST;
chmod 0755, $test;
}__________________________________________________________________ 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]
