Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl-cvs

svn commit: r1509781 - /perl/modperl/branches/httpd24/Makefile.PL

 

 

ModPerl modperl-cvs RSS feed   Index | Next | Previous | View Threaded


stevehay at apache

Aug 2, 2013, 10:07 AM

Post #1 of 1 (25 views)
Permalink
svn commit: r1509781 - /perl/modperl/branches/httpd24/Makefile.PL

Author: stevehay
Date: Fri Aug 2 17:07:35 2013
New Revision: 1509781

URL: http://svn.apache.org/r1509781
Log:
Add the path to mod_perl.so to the PATH when running the test suite on Windows

Httpd.exe is able to find mod_perl.so because the test httpd.conf contains a LoadModule line with the fully qualified path to mod_perl.so in it. However, before httpd.exe is started the test framework must create that httpd.conf file. In the case of mod_perl it uses perl.exe and goes into Apache/TestConfigPerl.pm's run_apache_test_configure(), which runs APACHE_TEST_CONFIGURE() in various modules in t/response/TestApache (e.g. subprocess.pm). Those modules all use Apache2::Const, but Apache2/Const/Const.dll and ModPerl/Const/Const.dll now depend on mod_perl.so for the 'perl_module' symbol. Therefore, perl.exe must be able to find mod_perl.so when running the tests, and this is the easiest way to achieve that.

There is no problem with Apache2::Const and ModPerl::Const depending on mod_perl.so because they are normally only used within a mod_perl application, which will (obviously) have mod_perl.so loaded already. (It is only the APR::* modules which we are at pains (elsewhere) to avoid having a dependency on mod_perl.so because they are of use outside of mod_perl applications.)

Modified:
perl/modperl/branches/httpd24/Makefile.PL

Modified: perl/modperl/branches/httpd24/Makefile.PL
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/Makefile.PL?rev=1509781&r1=1509780&r2=1509781&view=diff
==============================================================================
--- perl/modperl/branches/httpd24/Makefile.PL (original)
+++ perl/modperl/branches/httpd24/Makefile.PL Fri Aug 2 17:07:35 2013
@@ -775,8 +775,24 @@ sub MY::test {
$ap_bindir = File::Spec->catdir($build->{MP_AP_PREFIX}, 'bin')
if $build->{MP_AP_PREFIX};
}
+ my $modperl_libexecdir = '';
+ if ($build->is_dynamic) {
+ # need to add the location of mod_perl.so to the PATH
+ my $lib = $build->modperl_libpath() || '';
+ if ($lib) {
+ $modperl_libexecdir = File::Basename::dirname($lib);
+ }
+ else {
+ $modperl_libexecdir = File::Spec->catdir($build->{cwd},
+ 'src/modules/perl')
+ if $build->{cwd};
+ }
+ }
+ my $extra_path = '';
+ $extra_path .= ";$ap_bindir" if $ap_bindir;
+ $extra_path .= ";$modperl_libexecdir" if $modperl_libexecdir;
$preamble = <<EOF;
-PATH = \$(PATH);$ap_bindir
+PATH = \$(PATH)$extra_path
EOF
}
else {

ModPerl modperl-cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.