perl-test-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r330816 - in /perl/Apache-Test/trunk: Changes lib/Apache/Test.pm
Date Fri, 04 Nov 2005 14:57:48 GMT
Author: geoff
Date: Fri Nov  4 06:57:45 2005
New Revision: 330816

URL: http://svn.apache.org/viewcvs?rev=330816&view=rev
Log:
remove the mod_perl.pm entry from %INC after Apache::Test finishes
initializing itself.  because both mp1 and mp2 share the entry,
leaving it around means that Apache::Test might prevent later modules
from loading the real mod_perl module they're interested in, leading
to bad things

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

Modified: perl/Apache-Test/trunk/Changes
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/Changes?rev=330816&r1=330815&r2=330816&view=diff
==============================================================================
--- perl/Apache-Test/trunk/Changes (original)
+++ perl/Apache-Test/trunk/Changes Fri Nov  4 06:57:45 2005
@@ -8,6 +8,12 @@
 
 =item 1.28-dev
 
+remove the mod_perl.pm entry from %INC after Apache::Test finishes
+initializing itself.  because both mp1 and mp2 share the entry,
+leaving it around means that Apache::Test might prevent later modules
+from loading the real mod_perl module they're interested in, leading
+to bad things  [Geoffrey Young]
+
 use which("cover") to find the cover utility from Devel::Cover and run
 it only if found. [Stas]
 

Modified: perl/Apache-Test/trunk/lib/Apache/Test.pm
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/Test.pm?rev=330816&r1=330815&r2=330816&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/Test.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/Test.pm Fri Nov  4 06:57:45 2005
@@ -22,6 +22,18 @@
 use Config;
 use Apache::TestConfig ();
 
+BEGIN {
+    # Apache::Test loads a bunch of mp2 stuff while getting itself
+    # together.  because we need to choose one of mp1 or mp2 to load
+    # check first (and we choose mp2) $mod_perl::VERSION == 2.0
+    # just because someone loaded Apache::Test.  This Is Bad.  so,
+    # let's try to correct for that here by removing mod_perl from
+    # %INC after the above use() statements settle in.  nobody 
+    # should be relying on us loading up mod_perl.pm anyway...
+
+    delete $INC{'mod_perl.pm'};
+}
+
 use vars qw(@ISA @EXPORT %EXPORT_TAGS $VERSION %SubTests @SkipReasons);
 
 $VERSION = '1.28';



Mime
View raw message