perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tors...@apache.org
Subject svn commit: r1151822 - in /perl/modperl/branches/httpd24/lib: Apache2/Build.pm ModPerl/BuildOptions.pm
Date Thu, 28 Jul 2011 12:41:27 GMT
Author: torsten
Date: Thu Jul 28 12:41:26 2011
New Revision: 1151822

URL: http://svn.apache.org/viewvc?rev=1151822&view=rev
Log:
As of httpd 2.4 the MPM becomes a loadable module. Thus, modperl should
in principle require a threaded perl always. But if the admin knows that
only prefork will be used he can call "perl Makefile.PL NONTHREADED_OK=1"
to have the build process accept a non-threaded perl.

Modified:
    perl/modperl/branches/httpd24/lib/Apache2/Build.pm
    perl/modperl/branches/httpd24/lib/ModPerl/BuildOptions.pm

Modified: perl/modperl/branches/httpd24/lib/Apache2/Build.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/lib/Apache2/Build.pm?rev=1151822&r1=1151821&r2=1151822&view=diff
==============================================================================
--- perl/modperl/branches/httpd24/lib/Apache2/Build.pm (original)
+++ perl/modperl/branches/httpd24/lib/Apache2/Build.pm Thu Jul 28 12:41:26 2011
@@ -275,12 +275,13 @@ sub caller_package {
     return ($arg and ref($arg) eq __PACKAGE__) ? $arg : __PACKAGE__;
 }
 
-my %threaded_mpms = map { $_ => 1 }
-        qw(worker winnt beos mpmt_os2 netware leader perchild threadpool);
+my %threaded_mpms;
+undef @threaded_mpms{qw(worker winnt beos mpmt_os2 netware leader perchild
+			threadpool dynamic)};
 sub mpm_is_threaded {
     my $self = shift;
     my $mpm_name = $self->mpm_name();
-    return $threaded_mpms{$mpm_name} || 0;
+    return exists $threaded_mpms{$mpm_name} ? 1 : 0;
 }
 
 sub mpm_name {
@@ -288,6 +289,11 @@ sub mpm_name {
 
     return $self->{mpm_name} if $self->{mpm_name};
 
+    if ($self->httpd_version =~ /^(\d+)\.(\d+)\.(\d+)/) {
+	delete $threaded_mpms{dynamic} if $self->mp_nonthreaded_ok;
+	return $self->{mpm_name} = 'dynamic' if ($1*1000+$2)*1000+$3>=2003000;
+    }
+
     # XXX: hopefully apxs will work on win32 one day
     return $self->{mpm_name} = 'winnt' if WIN32;
 

Modified: perl/modperl/branches/httpd24/lib/ModPerl/BuildOptions.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/lib/ModPerl/BuildOptions.pm?rev=1151822&r1=1151821&r2=1151822&view=diff
==============================================================================
--- perl/modperl/branches/httpd24/lib/ModPerl/BuildOptions.pm (original)
+++ perl/modperl/branches/httpd24/lib/ModPerl/BuildOptions.pm Thu Jul 28 12:41:26 2011
@@ -264,4 +264,4 @@ GENERATE_XS    0    Generate XS code bas
 LIBNAME        0    Name of the modperl dso library (default is  mod_perl)
 COMPAT_1X      0    Compile-time mod_perl 1.0 backcompat (default is  on)
 APR_LIB        0    Lib used to build APR::* on Win32 (default is aprext)
-
+NONTHREADED_OK 0    Using a non-threaded perl is okay with httpd >=2.3



Mime
View raw message