You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by st...@apache.org on 2005/05/10 05:10:43 UTC

svn commit: r169403 - in /httpd/apreq/branches/1.x: Changes Makefile.PL

Author: stas
Date: Mon May  9 20:10:43 2005
New Revision: 169403

URL: http://svn.apache.org/viewcvs?rev=169403&view=rev
Log:
move the mod_perl version detection to the top of Makefile.PL, so
Apache-Test and other things won't fool around with %INC and confuse
the detection code.

Modified:
    httpd/apreq/branches/1.x/Changes
    httpd/apreq/branches/1.x/Makefile.PL

Modified: httpd/apreq/branches/1.x/Changes
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/1.x/Changes?rev=169403&r1=169402&r2=169403&view=diff
==============================================================================
--- httpd/apreq/branches/1.x/Changes (original)
+++ httpd/apreq/branches/1.x/Changes Mon May  9 20:10:43 2005
@@ -4,6 +4,10 @@
 
 =item 1.34 
 
+move the mod_perl version detection to the top of Makefile.PL, so
+Apache-Test and other things won't fool around with %INC and confuse
+the detection code. [Stas]
+
 
 
 =item 1.33 - December 15, 2004

Modified: httpd/apreq/branches/1.x/Makefile.PL
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/1.x/Makefile.PL?rev=169403&r1=169402&r2=169403&view=diff
==============================================================================
--- httpd/apreq/branches/1.x/Makefile.PL (original)
+++ httpd/apreq/branches/1.x/Makefile.PL Mon May  9 20:10:43 2005
@@ -3,6 +3,20 @@
 use FindBin;
 use 5.005;
 
+BEGIN {
+    unless (eval {require mod_perl}) {
+        die "Please install mod_perl: 1.25 < version < 1.99\n($@)";
+    }
+    my $file = $INC{"mod_perl.pm"};
+    my $have = "Found $file: version $mod_perl::VERSION";
+    if ($mod_perl::VERSION < 1.2402) {
+        die "$have\nPlease upgrade mod_perl to 1.24_02 or greater";
+    }
+    elsif ($mod_perl::VERSION > 1.98) {
+        die "$have\nmod_perl 1.x ( < 1.99) is required";
+    }
+}
+
 use File::Path qw(mkpath);
 use lib qw(Apache-Test/lib);
 
@@ -22,17 +36,6 @@
 if (HAS_APACHE_TEST) {
     require Apache::TestMM;
     Apache::TestMM->import(qw(test clean));
-}
-BEGIN {
-    unless (eval {require mod_perl}) {
-        die "Please install mod_perl: 1.25 < version < 1.99\n($@)";
-    }
-    if ($mod_perl::VERSION < 1.2402) {
-        die "Please upgrade mod_perl to 1.24_02 or greater";
-    }
-    elsif ($mod_perl::VERSION > 1.98) {
-        die "mod_perl 1.x ( < 1.99) is required";
-    }
 }
 
 my $conf_data = join '', <DATA>;