hi all

have_module('mod_perl.c') doesn't work currently for DSO installations unless the parent config has a LoadModule statement in it.

the attached patch fixes this - once the appropriate .so is found, it's added to the cached module list so that the fallback for have_module() is populated appropriately.

I'm going to hold up 1.05 until this is integrated, as it's pretty important since have_module('mod_perl.c') is now the way to test for the presence of mod_perl.

--Geoff
Index: Apache-Test/lib/Apache/TestConfigPerl.pm
===================================================================
RCS file: 
/home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm,v
retrieving revision 1.79
diff -u -r1.79 TestConfigPerl.pm
--- Apache-Test/lib/Apache/TestConfigPerl.pm    21 Oct 2003 22:09:41 -0000      
1.79
+++ Apache-Test/lib/Apache/TestConfigPerl.pm    22 Oct 2003 14:58:43 -0000
@@ -67,6 +67,11 @@
             $lib =~ s/lib$/dll/;
             $cfg = 'LoadFile ' . qq("$lib"\n) if -e $lib;
        }
+        # add the module we found to the cached modules list
+        # otherwise have_module('mod_perl') doesn't work unless
+        # we have a LoadModule in our base config
+        $self->{modules}->{'mod_perl.c'} = $vars->{libmodperl};
+
         $cfg .= 'LoadModule ' . qq(perl_module "$vars->{libmodperl}"\n);
     }
     else {

Reply via email to