On Wed, 13 Oct 2004 22:41:58 -0400, Stas Bekman wrote:

> Christian Krause wrote:
>> I can't build mod_perl on some machines. The "make test" results in the
>> following error:
> [...]
>> Can't locate object method "method_is_limited" via package "Apache::CmdParms" at 
>> /usr/src/RPM/BUILD/mod_perl-1.99_16/t/response/TestDirective/cmdparms.pm line 50.\n
>> [  error]
> [...]
>> Reason:
>> - in xs/maps/apache_functions.map is the MODULE=Apache::MethodList (and
>> so the method ap_method_is_limited) disabled
>> - in xs/maps/modperl_functions.map is the MODULE=Apache::CmdParms (and
>> so the method ap_method_is_limited) enabled

> Thanks for the detailed report, great analysis and the patch,
> Christian. But it has already been fixed[1] by gozer in the current
> cvs [2].

Ok, fine.

> While you are at it, if you can post a patch that will make the build
> croak if the same function is encountered more than once, that would
> be helpful for the future. Thanks.

Here is a patch which makes the Makefile creating abort in case of
1) an already mapped function will be set to undef
2) an already mapped function will be defined again

I hope this helps...

Best regards,
Christian

--- mod_perl-1.99_16.old/lib/ModPerl/FunctionMap.pm     2004-03-04 07:01:06.000000000 
+0100
+++ mod_perl-1.99_16/lib/ModPerl/FunctionMap.pm 2004-10-14 21:58:36.000000000 +0200
@@ -135,7 +135,11 @@

         if ($name =~ s/^(\W)// or not $cur{MODULE} or $disabled) {
             #notimplemented or cooked by hand
-            $map->{$name} = undef;
+            if ($map->{$name}) {
+                   die "already mapped function \"$name\" will be undef, assume a bug 
in the map files";
+           }
+           
+           $map->{$name} = undef;
             push @{ $self->{disabled}->{ $1 || '!' } }, $name;
             next;
         }
@@ -160,7 +164,11 @@
             $name =~ s{^(DEFINE_)(.*)}
               {$1 . ModPerl::WrapXS::make_prefix($2, $cur{CLASS})}e;
         }
-
+       
+       if ($map->{$name}) {
+           die "already mapped function \"$name\" will be defined again, assume a bug 
in the map files";
+       }
+           
         my $entry = $map->{$name} = {
            name        => $alias || $name,
            dispatch    => $dispatch,

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to