Fred Moyer wrote:
This seems like a reasonable request. I know there are a few times
that I had to put the apreq module load in extra.conf.in, and it would
have been nice to have things magically 'just work'. I only have one
modperl application that does not use libapreq, and I think that I
wouldn't mind the extra module loaded during testing.
OTOH I don't think this qualifies as a 'critical' bug. But any
thoughts or issues with this patch?
It sounds to me like the httpd.conf that A::T is parsing isn't actually
the httpd.conf that they use in production, and doesn't have the
LoadModule for apreq2 in it. According to the documentation you can
override the conf parsed by A::T using this:
perl Makefile.PL -httpd_conf /path/to/httpd.conf
I don't really think that this patch is strictly required (assuming that
running Makefile.PL as describe above works), but I also doubt that it's
going to cause more problems than it fixes for people that don't know
about, or haven't read the documentation.
I bet a lot of people installing modules from the cpan shell run into
problems like this. I know i have since i often put my real httpd.conf
/www/conf, while the default is in /usr/local/prefork/conf.
Adam
Index: lib/Apache/TestRunPerl.pm
===================================================================
--- lib/Apache/TestRunPerl.pm (revision 766433)
+++ lib/Apache/TestRunPerl.pm (working copy)
@@ -73,6 +73,22 @@
Apache::TestRun::exit_perl(0);
}
+ if ($rev == 2) {
+ # load apreq2 if it is present
+ # do things a bit differently that find_and_load_module()
+ # because apreq2 can't be loaded that way (the 2 causes a problem)
+ my $name = 'mod_apreq2.so';
+ my $mod_path = $test_config->find_apache_module($name) or return;
+
+ # don't match the 2 here
+ my ($sym) = $name =~ m/mod_(\w+)2\./;
+
+ if ($mod_path && -e $mod_path) {
+ $test_config->preamble(IfModule => "!mod_$sym.c",
+ qq{LoadModule ${sym}_module "$mod_path"\n});
+ }
+ }
+
$test_config->preamble_register(qw(configure_libmodperl
configure_env));
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@perl.apache.org
For additional commands, e-mail: dev-h...@perl.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@perl.apache.org
For additional commands, e-mail: dev-h...@perl.apache.org