You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-commits@perl.apache.org by jo...@apache.org on 2005/03/08 04:15:52 UTC

svn commit: r156487 - perl/Apache-Test/branches/apache2-rename-unstable/Apache-TestItSelf/Apache-TestMe/Makefile.PL

Author: joes
Date: Mon Mar  7 19:15:51 2005
New Revision: 156487

URL: http://svn.apache.org/viewcvs?view=rev&rev=156487
Log:
mp detection logic split into require_mod_perl()
and require_mod_perl2(), matching mod_perl2.pm rename.

Modified:
    perl/Apache-Test/branches/apache2-rename-unstable/Apache-TestItSelf/Apache-TestMe/Makefile.PL

Modified: perl/Apache-Test/branches/apache2-rename-unstable/Apache-TestItSelf/Apache-TestMe/Makefile.PL
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/branches/apache2-rename-unstable/Apache-TestItSelf/Apache-TestMe/Makefile.PL?view=diff&r1=156486&r2=156487
==============================================================================
--- perl/Apache-Test/branches/apache2-rename-unstable/Apache-TestItSelf/Apache-TestMe/Makefile.PL (original)
+++ perl/Apache-Test/branches/apache2-rename-unstable/Apache-TestItSelf/Apache-TestMe/Makefile.PL Mon Mar  7 19:15:51 2005
@@ -80,16 +80,14 @@
     }
     elsif ($wanted == 2) {
         #warn "Looking for mod_perl 2.0";
-        require Apache2;
-        require_mod_perl();
+        require_mod_perl2();
         if ($mod_perl::VERSION < 1.99) {
             die "You don't seem to have mod_perl 2.0 installed";
         }
         $selected = 2;
     }
     else {
-        require_mod_perl();
-        $selected = $mod_perl::VERSION >= 1.99 ? 2 : 1;
+        $selected = eval { require_mod_perl2() or require_mod_perl() };
         warn "Using $mod_perl::VERSION\n";
     }
 
@@ -99,6 +97,13 @@
 sub require_mod_perl {
     eval { require mod_perl };
     die "Can't find mod_perl installed\nThe error was: $@" if $@;
+    1;
+}
+
+sub require_mod_perl2 {
+    eval { require mod_perl2 };
+    die "Can't find mod_perl installed\nThe error was: $@" if $@;
+    2;
 }
 
 
@@ -149,7 +154,7 @@
 
     unless ($wanted) {
         # if still unknown try to require mod_perl.pm
-        eval { require mod_perl };
+        eval { require mod_perl2 or require mod_perl };
         unless ($@) {
             $wanted = $mod_perl::VERSION >= 1.99 ? 2 : 1;
         }
@@ -206,7 +211,7 @@
 
     unless ($wanted) {
         # if still unknown try to require mod_perl.pm
-        eval { require mod_perl };
+        eval { require mod_perl2 or require mod_perl };
         unless ($@) {
             $wanted = $mod_perl::VERSION >= 1.99 ? 2 : 1;
         }