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 ph...@apache.org on 2010/02/09 22:15:37 UTC

svn commit: r908226 - in /perl/Apache-Test/trunk: Changes lib/Apache/TestRunPerl.pm

Author: phred
Date: Tue Feb  9 21:15:36 2010
New Revision: 908226

URL: http://svn.apache.org/viewvc?rev=908226&view=rev
Log:
PR 21554

Load mod_apreq2.so if it is available.

Submitted by:  Derek Price <de...@ximbiot.com>
Signed off by:  Fred Moyer <ph...@apache.org>

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

Modified: perl/Apache-Test/trunk/Changes
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/Changes?rev=908226&r1=908225&r2=908226&view=diff
==============================================================================
--- perl/Apache-Test/trunk/Changes (original)
+++ perl/Apache-Test/trunk/Changes Tue Feb  9 21:15:36 2010
@@ -8,6 +8,10 @@
 
 =item 1.31-rc2
 
+PR: 21554
+Load mod_apreq2.so if it is available
+[Derek Price, <de...@ximbiot.com>]
+
 Add conditional to ignore IfVersion directive if mod_version is not built.
 [Adam Prime <ad...@utoronto.ca>, Fred Moyer <ph...@apache.org>]
 

Modified: perl/Apache-Test/trunk/lib/Apache/TestRunPerl.pm
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/lib/Apache/TestRunPerl.pm?rev=908226&r1=908225&r2=908226&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestRunPerl.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestRunPerl.pm Tue Feb  9 21:15:36 2010
@@ -73,6 +73,22 @@
         Apache::TestRun::exit_perl(0);
     }
 
+    if ($rev == 2) {
+        # load apreq2 if it is present
+        # do things a bit differently that find_and_load_module()
+        # because apreq2 can't be loaded that way (the 2 causes a problem)
+        my $name = 'mod_apreq2.so';
+        my $mod_path = $test_config->find_apache_module($name) or return;
+
+        # don't match the 2 here
+        my ($sym) = $name =~ m/mod_(\w+)2\./;
+
+        if ($mod_path && -e $mod_path) {
+            $test_config->preamble(IfModule => "!mod_$sym.c",
+                        qq{LoadModule ${sym}_module "$mod_path"\n});
+        }
+    }
+
     $test_config->preamble_register(qw(configure_libmodperl
                                        configure_env));