why would you use TestRunPerl to test against not-modperl enabled Apache? If by accident I think it is better to discover that and die before even starting to run tests.
in a third-party (CPAN) module, you don't have much control.
say I want to test my module against mod_perl. I need to use TestRunPerl if I want stuff like modperl_inc.pl to work. but the end-user passes me
perl Makefile.PL -apxs /some/no-perl/apache/bin/apxs
and the server blows up. at least if you have no -apxs, you get a nice warning.
the issue here is a real one for me - I'm working on a distribution where only one file is mod_perl based, and I can't assume that even though I want the mod_perl stuff enabled, the user actually has it.
I understand that. Please re-read my previous reply. To repeat:
TestRunPerl implies that mod_perl is available. If it is not, TestRunPerl should abort *before* it creates the config file, telling user to use a mod_perl enabled server. For DSO it's trivial, for static build 'httpd -l' should do the trick.
There is nothing wrong with your patch, but it hides the problem instead of fixing it. So what if all mp directives will be enclosed in IfModule? Your tests won't work in any case.
Not quite so, TestRunPerl already assumes that mod_perl is available.
that's a bad assumption. since you configure TestRunPerl from the perl Makefile.PL stage, you can't know what the end-user has on his system.
Not really, you don't run TestRunPerl's configure from Makefile.PL, only from t/TEST.
besides, if you want to do
t/TEST -apxs /with-modperl/bin/apxs
t/TEST -apxs /without-modperl/bin/apxs
I think that should be ok, and you have have_module('mod_perl.c') to allow just that.
Adding noise to httpd.conf doesn't make things better.
it's not noise. if it were then there would be no reason to <IfModule> out the LoadModule statement for mod_perl.
It's there to prevent loading mod_perl DSO if someone messed up and re-built a static mod_perl without fixing their global httpd.conf (which previously was dynamic). It's not really needed I believe.
Besides if you could do:
<IfModule mod_perl.c> all mp configs </IfModule>
and not ifmodule for each directive that would be better I guess.
yes, I thought so too. but the code for each of those is scattered about the suite, which makes it difficult to tie each of them together nicely.
That's true.
__________________________________________________________________ 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