You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-cvs@perl.apache.org by ra...@apache.org on 2006/05/16 06:42:57 UTC

svn commit: r406827 - /perl/modperl/docs/trunk/src/docs/2.0/os/win32/mpinstall

Author: randyk
Date: Mon May 15 21:42:55 2006
New Revision: 406827

URL: http://svn.apache.org/viewcvs?rev=406827&view=rev
Log:
enable script to handle mod_perl install for Apache/2.2.

Modified:
    perl/modperl/docs/trunk/src/docs/2.0/os/win32/mpinstall

Modified: perl/modperl/docs/trunk/src/docs/2.0/os/win32/mpinstall
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/src/docs/2.0/os/win32/mpinstall?rev=406827&r1=406826&r2=406827&view=diff
==============================================================================
--- perl/modperl/docs/trunk/src/docs/2.0/os/win32/mpinstall (original)
+++ perl/modperl/docs/trunk/src/docs/2.0/os/win32/mpinstall Mon May 15 21:42:55 2006
@@ -20,7 +20,7 @@
 die "This only works for Win32" unless $^O =~ /Win32/i;
 die "No mod_perl ppm package available for this Perl" if ($] < 5.006001);
 
-my ($apache2, $apache);
+my ($apache2, $apache, $apache22);
 my @drives = drives();
 
 # find a possible Apache2 directory
@@ -72,9 +72,17 @@
             unless $vers =~ m!Apache/1.3!;
     }
     else {
-        $vers = qx{"$apache2/bin/apache.exe" -v};
-        die qq{"$apache2" does not appear to be version 2.0}
-            unless $vers =~ m!Apache/2.0!;
+        my $vers;
+        for my $binary(qw(Apache.exe httpd.exe)) {
+            my $b = File::Spec->catfile($apache2, 'bin', $binary);
+            next unless -x $b;
+            $vers = qx{$b -v};
+            last;
+	}
+        die qq{Cannot determine the Apache version} unless $vers;
+        die qq{"$apache2" does not appear to be version 2.x}
+            unless $vers =~ m!Apache/2.!;
+        $apache22 = 1 if $vers =~ m!Apache/2.2!;
     }
 }
 # prompt to get an Apache installation directory
@@ -143,14 +151,21 @@
     if ($apache2) {
         my $ans = prompt('Do you want the latest mod_perl 2 development version?', 'no');
         if ($ans =~ /^n/i) {
-            $ppdfile = 'mod_perl.ppd';
-            $tgzfile = 'mod_perl.tar.gz';
-            $so_fake = 'mod_perl.so';
-       }
+            if ($apache22) {
+                $ppdfile = 'mod_perl-2.2.ppd';
+                $tgzfile = 'mod_perl-2.2.tar.gz';
+                $so_fake = 'mod_perl-2.2.so';
+            }
+            else {
+                $ppdfile = 'mod_perl.ppd';
+                $tgzfile = 'mod_perl.tar.gz';
+                $so_fake = 'mod_perl.so';
+            }
+        }
         else {
             $ppdfile = 'mod_perl-dev.ppd';
             $tgzfile = 'mod_perl-dev.tar.gz';
-            $so_fake = 'mod_perl-dev.so';            
+            $so_fake = 'mod_perl-dev.so';
         }
         $ppd = $ppms . $ppdfile;
         $tgz = $ppmsx86 . $tgzfile;



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org