On Thu, 3 Aug 2000, Nelson Oliveira wrote:

> When you use the ADD_MODULE option to pass an additional
> module to Apache, in the top Makefile.PL of mod_perl,
> like
> 
>  perl Makefile.PL ADD_MODULE=src/modules/jserv/libjserv.a
> 
> this will result in the wrong argument to the configure script
> of Apache, like
> 
>   ... configure  --enable-module=src
> 
> The correct argument should have been
> 
>   ... configure  --activate-module=src/modules/jserv/libjserv.a
> 
> To fix this problem, apply the included patch to Makefile.PL
> I only changed the order in which the pattern matching is
> performed, because the pattern
>   /([a-zA-Z0-9][a-zA-Z0-9_]*)/
> 
> will always match this string first, which is not what I want
> 
>    src/modules/jserv/libjserv.a
> 
> I applied the fast fix, by changing the order of the pattern
> matchine, but I think by using this pattern as the first
>   /([a-zA-Z0-9][a-zA-Z0-9_]*$)/
> 
> the problem is solved as well.

thanks, i think this patch is the right way to go:

Index: Makefile.PL
===================================================================
RCS file: /home/cvs/modperl/Makefile.PL,v
retrieving revision 1.168
diff -u -r1.168 Makefile.PL
--- Makefile.PL 2000/09/26 21:19:33     1.168
+++ Makefile.PL 2000/09/27 17:52:12
@@ -975,10 +975,10 @@
        } 
        if($ADD_MODULE) {
            for (split ",", $ADD_MODULE) {
-               if(/([a-zA-Z0-9][a-zA-Z0-9_]*)/) {
+               if(/^([a-zA-Z0-9][a-zA-Z0-9_]+)$/) {
                    $cmd .= " --enable-module=$1";
                }
-               elsif(m:(src/modules/[^/]+/[a-zA-Z0-9][a-zA-Z0-9_]*):) {
+               elsif(m:(src/modules/[^/]+/[^/]+)$:) {
                    $cmd .= " --activate-module=$1";
                }
            }

Reply via email to