perl-test-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r372663 - /perl/Apache-Test/trunk/lib/Apache/Test.pm
Date Thu, 26 Jan 2006 23:45:01 GMT
Author: colm
Date: Thu Jan 26 15:44:59 2006
New Revision: 372663

URL: http://svn.apache.org/viewcvs?rev=372663&view=rev
Log:
Revert most of r371931, as it currently breaks the test suite. need_php
in particular is returning success when it shouldn't be.

Modified:
    perl/Apache-Test/trunk/lib/Apache/Test.pm

Modified: perl/Apache-Test/trunk/lib/Apache/Test.pm
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/Test.pm?rev=372663&r1=372662&r2=372663&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/Test.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/Test.pm Thu Jan 26 15:44:59 2006
@@ -348,27 +348,27 @@
 }
 
 sub need_cgi {
-    return _need_multi(qw(cgi cgid));
+    return need_module("cgi") || need_module("cgid");
 }
 
 sub need_php {
-    return _need_multi(qw(php4 php5 sapi_apache2.c));
+    return need_module("php4") || need_module("php5") || need_module("sapi_apache2.c");
 }
 
 sub need_php4 {
-    return _need_multi(qw(php4 php5));
+    return need_module("php4") || need_module("php5");
 }
 
 sub need_access {
-    return _need_multi(qw(access authz_host));
+    return need_module("access") || need_module("authz_host");
 }
 
 sub need_auth {
-    return _need_multi(qw(auth auth_basic));
+    return need_module("auth") || need_module("auth_basic");
 }
 
 sub need_imagemap {
-    return _need_multi(qw(imagemap imap));
+    return need_module("imagemap") || need_module("imap");
 }
 
 sub _need_multi {
@@ -376,16 +376,19 @@
     my $reason = join ' or ', @need;
     my $rc;
 
+    for (@need)
     {
         local @SkipReasons;
 
-        $rc = grep { need_module($_) } @need;
+        if (need_module($_)) {
+	    return 1;
+        }
     }
-
+    
     push @SkipReasons, "cannot find one of $reason"
         unless $rc;
 
-    return $rc;     
+    return 0;     
 }
 
 sub need_apache {



Mime
View raw message