You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by jo...@apache.org on 2005/03/08 00:51:36 UTC
svn commit: r156466 [1/3] - in
perl/modperl/branches/apache2-rename-unstable: ./ ModPerl-Registry/
ModPerl-Registry/lib/ModPerl/ ModPerl-Registry/t/ lib/ lib/Apache/
lib/Apache2/ lib/Apache2/PerlSections/ lib/ModPerl/ src/modules/perl/
t/htdocs/includes/ t/htdocs/perlio/ todo/ xs/ xs/APR/APR/ xs/APR/PerlIO/
xs/APR/aprext/ xs/Apache/ xs/Apache/Access/ xs/Apache/CmdParms/
xs/Apache/Command/ xs/Apache/Connection/ xs/Apache/Const/
xs/Apache/Directive/ xs/Apache/Filter/ xs/Apache/Log/ xs/Apache/MPM/
xs/Apache/Module/ xs/Apache/RequestIO/ xs/Apache/RequestRec/
xs/Apache/RequestUtil/ xs/Apache/Response/ xs/Apache/ServerUtil/
xs/Apache/SubProcess/ xs/Apache/SubRequest/ xs/Apache/URI/ xs/Apache/Util/
xs/maps/ xs/tables/current/Apache/ xs/tables/current/Apache2/
xs/tables/current/ModPerl/
Author: joes
Date: Mon Mar 7 15:51:14 2005
New Revision: 156466
URL: http://svn.apache.org/viewcvs?view=rev&rev=156466
Log:
s/Apache::/Apache2::/g and s/mod_perl/mod_perl2/g in all module
APIs, breaking both MP_INST_APACHE2 and the test suite. Note:
this change includes renaming the perlio mode.
This is the first of two commits, and should contain all
the substantive changes required.
Added:
perl/modperl/branches/apache2-rename-unstable/lib/Apache2/
- copied from r156220, perl/modperl/branches/apache2-rename-unstable/lib/Apache/
perl/modperl/branches/apache2-rename-unstable/lib/mod_perl2.pm
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/lib/mod_perl.pm
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Access/Apache2__Access.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/Access/Apache__Access.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/CmdParms/Apache2__CmdParms.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/CmdParms/Apache__CmdParms.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Command/Apache2__Command.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/Command/Apache__Command.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Connection/Apache2__Connection.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/Connection/Apache__Connection.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Directive/Apache2__Directive.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/Directive/Apache__Directive.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Filter/Apache2__Filter.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/Filter/Apache__Filter.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Log/Apache2__Log.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/Log/Apache__Log.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/MPM/Apache2__MPM.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/MPM/Apache__MPM.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Module/Apache2__Module.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/Module/Apache__Module.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/RequestIO/Apache2__RequestIO.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/RequestIO/Apache__RequestIO.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/RequestRec/Apache2__RequestRec.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/RequestRec/Apache__RequestRec.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/RequestUtil/Apache2__RequestUtil.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/RequestUtil/Apache__RequestUtil.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Response/Apache2__Response.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/Response/Apache__Response.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/ServerUtil/Apache2__ServerUtil.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/ServerUtil/Apache__ServerUtil.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/SubProcess/Apache2__SubProcess.h
- copied unchanged from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/SubProcess/Apache__SubProcess.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/SubRequest/Apache2__SubRequest.h
- copied unchanged from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/SubRequest/Apache__SubRequest.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/URI/Apache2__URI.h
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/URI/Apache__URI.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Util/Apache2__Util.h
- copied unchanged from r156220, perl/modperl/branches/apache2-rename-unstable/xs/Apache/Util/Apache__Util.h
perl/modperl/branches/apache2-rename-unstable/xs/maps/apache2_functions.map
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/maps/apache_functions.map
perl/modperl/branches/apache2-rename-unstable/xs/maps/apache2_structures.map
- copied unchanged from r156220, perl/modperl/branches/apache2-rename-unstable/xs/maps/apache_structures.map
perl/modperl/branches/apache2-rename-unstable/xs/maps/apache2_types.map
- copied, changed from r156220, perl/modperl/branches/apache2-rename-unstable/xs/maps/apache_types.map
perl/modperl/branches/apache2-rename-unstable/xs/tables/current/Apache2/
- copied from r156220, perl/modperl/branches/apache2-rename-unstable/xs/tables/current/Apache/
Removed:
perl/modperl/branches/apache2-rename-unstable/lib/Apache/
perl/modperl/branches/apache2-rename-unstable/lib/mod_perl.pm
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Access/Apache__Access.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/CmdParms/Apache__CmdParms.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Command/Apache__Command.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Connection/Apache__Connection.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Directive/Apache__Directive.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Filter/Apache__Filter.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Log/Apache__Log.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/MPM/Apache__MPM.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Module/Apache__Module.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/RequestIO/Apache__RequestIO.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/RequestRec/Apache__RequestRec.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/RequestUtil/Apache__RequestUtil.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Response/Apache__Response.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/ServerUtil/Apache__ServerUtil.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/SubProcess/Apache__SubProcess.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/SubRequest/Apache__SubRequest.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/URI/Apache__URI.h
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Util/Apache__Util.h
perl/modperl/branches/apache2-rename-unstable/xs/maps/apache_functions.map
perl/modperl/branches/apache2-rename-unstable/xs/maps/apache_structures.map
perl/modperl/branches/apache2-rename-unstable/xs/maps/apache_types.map
perl/modperl/branches/apache2-rename-unstable/xs/tables/current/Apache/
Modified:
perl/modperl/branches/apache2-rename-unstable/Changes
perl/modperl/branches/apache2-rename-unstable/Makefile.PL
perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/Makefile.PL
perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/README
perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/lib/ModPerl/RegistryLoader.pm
perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/t/TEST.PL
perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Build.pm
perl/modperl/branches/apache2-rename-unstable/lib/Apache2/ParseSource.pm
perl/modperl/branches/apache2-rename-unstable/lib/Apache2/PerlSections.pm
perl/modperl/branches/apache2-rename-unstable/lib/Apache2/PerlSections/Dump.pm
perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Reload.pm
perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Resource.pm
perl/modperl/branches/apache2-rename-unstable/lib/Apache2/SizeLimit.pm
perl/modperl/branches/apache2-rename-unstable/lib/Apache2/SourceTables.pm
perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Status.pm
perl/modperl/branches/apache2-rename-unstable/lib/Apache2/XSLoader.pm
perl/modperl/branches/apache2-rename-unstable/lib/Apache2/compat.pm
perl/modperl/branches/apache2-rename-unstable/lib/Apache2/porting.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildMM.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildOptions.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/Code.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/Config.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/FunctionMap.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/MM.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/MapUtil.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/ParseSource.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/TestReport.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/TestRun.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/TypeMap.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/WrapXS.pm
perl/modperl/branches/apache2-rename-unstable/src/modules/perl/mod_perl.c
perl/modperl/branches/apache2-rename-unstable/src/modules/perl/modperl_callback.c
perl/modperl/branches/apache2-rename-unstable/src/modules/perl/modperl_callback.h
perl/modperl/branches/apache2-rename-unstable/src/modules/perl/modperl_cmd.c
perl/modperl/branches/apache2-rename-unstable/src/modules/perl/modperl_const.c
perl/modperl/branches/apache2-rename-unstable/src/modules/perl/modperl_filter.c
perl/modperl/branches/apache2-rename-unstable/src/modules/perl/modperl_io.c
perl/modperl/branches/apache2-rename-unstable/src/modules/perl/modperl_io_apache.c
perl/modperl/branches/apache2-rename-unstable/src/modules/perl/modperl_module.c
perl/modperl/branches/apache2-rename-unstable/src/modules/perl/modperl_util.c
perl/modperl/branches/apache2-rename-unstable/t/htdocs/includes/clear.shtml
perl/modperl/branches/apache2-rename-unstable/t/htdocs/perlio/MoonRise.jpeg
perl/modperl/branches/apache2-rename-unstable/todo/README
perl/modperl/branches/apache2-rename-unstable/todo/bugs_mp
perl/modperl/branches/apache2-rename-unstable/todo/docs
perl/modperl/branches/apache2-rename-unstable/todo/features_optimization
perl/modperl/branches/apache2-rename-unstable/xs/APR/APR/Makefile.PL
perl/modperl/branches/apache2-rename-unstable/xs/APR/PerlIO/Makefile.PL
perl/modperl/branches/apache2-rename-unstable/xs/APR/aprext/Makefile.PL
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Const/Const.pm
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Const/Const.xs
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Const/Makefile.PL
perl/modperl/branches/apache2-rename-unstable/xs/Apache/Makefile.PL
perl/modperl/branches/apache2-rename-unstable/xs/maps/apr_functions.map
perl/modperl/branches/apache2-rename-unstable/xs/maps/modperl_functions.map
perl/modperl/branches/apache2-rename-unstable/xs/maps/modperl_types.map
perl/modperl/branches/apache2-rename-unstable/xs/modperl_xs_util.h
perl/modperl/branches/apache2-rename-unstable/xs/tables/current/Apache2/ConstantsTable.pm
perl/modperl/branches/apache2-rename-unstable/xs/tables/current/Apache2/FunctionTable.pm
perl/modperl/branches/apache2-rename-unstable/xs/tables/current/Apache2/StructureTable.pm
perl/modperl/branches/apache2-rename-unstable/xs/tables/current/ModPerl/FunctionTable.pm
Modified: perl/modperl/branches/apache2-rename-unstable/Changes
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/Changes?view=diff&r1=156465&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/Changes (original)
+++ perl/modperl/branches/apache2-rename-unstable/Changes Mon Mar 7 15:51:14 2005
@@ -12,6 +12,9 @@
=item 1.999_22-dev
+s/Apache::/Apache2::/g and s/mod_perl/mod_perl2/g in all module
+APIs, breaking both MP_INST_APACHE2 and the test suite [joes].
+
ModPerl::Registry no longer checks for -x bit (we don't executed
scripts anyway), and thus works on acl-based filesystems. Also
replaced the -r check with a proper error handling when the file is
@@ -1443,7 +1446,7 @@
renamed the private modperl_module_config_get_obj function to
modperl_module_config_create_obj, since the logic creates
the object but doesn't dig it out if it already exists. then,
-moved logic from mpxs_Apache__Module_get_config into a new public
+moved logic from mpxs_Apache2__Module_get_config into a new public
C function that reused the old name, modperl_module_config_get_obj.
while Apache::Module->get_config exists as a wrapper to return the
object to Perl space, now C/XS folks can also access the object
Modified: perl/modperl/branches/apache2-rename-unstable/Makefile.PL
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/Makefile.PL?view=diff&r1=156465&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/Makefile.PL (original)
+++ perl/modperl/branches/apache2-rename-unstable/Makefile.PL Mon Mar 7 15:51:14 2005
@@ -13,10 +13,11 @@
BEGIN {
eval {
- require mod_perl;
- if ($mod_perl::VERSION < 1.99) {
- $old_modperl_version = $mod_perl::VERSION;
- }
+ require mod_perl2;
+# XXX: this section is unnecessary now
+# if ($mod_perl2::VERSION < 1.99) {
+# $old_modperl_version = $mod_perl::VERSION;
+# }
$old_modperl_pm = delete $INC{'mod_perl.pm'};
%mod_perl:: = ();
};
@@ -32,7 +33,7 @@
use File::Basename 'basename';
use File::Find ();
-use Apache::Build ();
+use Apache2::Build ();
use Apache::TestSmokePerl ();
use Apache::TestTrace;
use ModPerl::TestReport ();
@@ -40,12 +41,12 @@
use ModPerl::Code ();
use ModPerl::BuildMM ();
-use constant WIN32 => Apache::Build::WIN32;
-use constant BUILD_APREXT => Apache::Build::BUILD_APREXT;
+use constant WIN32 => Apache2::Build::WIN32;
+use constant BUILD_APREXT => Apache2::Build::BUILD_APREXT;
our $VERSION;
-my $build = Apache::Build->new(init => 1);
+my $build = Apache2::Build->new(init => 1);
my $code = ModPerl::Code->new;
win32_fetch_apxs() if WIN32;
@@ -63,14 +64,13 @@
my @xs_h_files = map catfile("xs", $_),
qw(modperl_xs_sv_convert.h modperl_xs_typedefs.h modperl_xs_util.h
APR/PerlIO/modperl_apr_perlio.h);
-
my @exe_files = map "bin/$_", qw(mp2doc mp2bug);
ModPerl::BuildMM::WriteMakefile(
- NAME => 'mod_perl',
+ NAME => 'mod_perl2',
VERSION => '2.0.0-RC5',
NO_META => 1,
- ABSTRACT_FROM => 'lib/mod_perl.pm',
+ ABSTRACT_FROM => 'lib/mod_perl2.pm',
EXE_FILES => \@exe_files,
DEFINE => get_DEFINE(),
macro => {
@@ -283,7 +283,7 @@
exit(1);
}
- printf "Configuring Apache/%s mod_perl/%s Perl/v%vd\n",
+ printf "Configuring Apache/%s mod_perl2/%s Perl/v%vd\n",
$httpd_version, $VERSION, $^V;
my $apr_config = $build->get_apr_config; #cache it
@@ -302,7 +302,7 @@
debug "unlink...$_" if -e $_ && unlink;
}
- #ModPerl::BuildMM will use Apache::BuildConfig in subdir/Makefile.PL's
+ #ModPerl::BuildMM will use Apache2::BuildConfig in subdir/Makefile.PL's
$build->save;
ModPerl::TestRun->generate_script;
@@ -368,7 +368,7 @@
sub post_configure {
#now have any data subdir/Makefile.PL's save, e.g. XS
- $build = Apache::Build->build_config;
+ $build = Apache2::Build->build_config;
$build->write_src_makefile;
$build->save_ldopts;
@@ -465,9 +465,9 @@
}
sub set_modperl_version {
- require './lib/mod_perl.pm';
+ require './lib/mod_perl2.pm';
- $VERSION = $mod_perl::VERSION_TRIPLET;
+ $VERSION = $mod_perl2::VERSION_TRIPLET;
open my $fh, 'Changes';
while (<$fh>) {
@@ -488,7 +488,7 @@
my $perl_version = $];
$perl_version =~ s/5.00(\d)(?:00(\d))?/"5.$1." . ($2||0)/e;
- my $perl_threads = Apache::Build::PERL_HAS_ITHREADS ? "w/" : "w/o";
+ my $perl_threads = Apache2::Build::PERL_HAS_ITHREADS ? "w/" : "w/o";
my $perl_string = "Using Perl $perl_version $perl_threads ithreads";
my $mpm = $build->mpm_name();
@@ -498,7 +498,7 @@
push @fail, "Perl 5.8 or higher"
unless $] >= 5.008;
push @fail, "Perl built with ithreads (build perl with -Dusethreads)"
- unless Apache::Build::PERL_HAS_ITHREADS();
+ unless Apache2::Build::PERL_HAS_ITHREADS();
if (@fail) {
error "$perl_string and '$mpm' mpm httpd.",
"Failed requirements:",
@@ -509,7 +509,7 @@
else {
# before 5.8.2, perl_shutdown is incomplete (in the case of ithreads
# each PerlInterpreter * gets tossed so it works)
- if ($build->should_build_apache && !Apache::Build::PERL_HAS_ITHREADS) {
+ if ($build->should_build_apache && !Apache2::Build::PERL_HAS_ITHREADS) {
# before 5.8.2, perl_shutdown is incomplete
if ($] < 5.008_002) {
error "static $mpm mpm requires a threaded ".
@@ -604,7 +604,7 @@
use Config;
use constant WIN32 => $^O eq 'MSWin32';
-use constant BUILD_APREXT => Apache::Build::BUILD_APREXT;
+use constant BUILD_APREXT => Apache2::Build::BUILD_APREXT;
my $apache_test_install;
BEGIN {
Modified: perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/Makefile.PL
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/Makefile.PL?view=diff&r1=156465&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/Makefile.PL (original)
+++ perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/Makefile.PL Mon Mar 7 15:51:14 2005
@@ -7,7 +7,7 @@
use ModPerl::BuildMM ();
use Apache::TestSmokePerl ();
-use Apache::Build ();
+use Apache2::Build ();
# enable 'make test|clean'
use Apache::TestMM qw(test clean);
@@ -22,7 +22,7 @@
# accept the configs from comman line
Apache::TestMM::filter_args();
-my $build = Apache::Build->build_config;
+my $build = Apache2::Build->build_config;
if ($build->should_build_apache) {
push @Apache::TestMM::Argv, ('httpd' => $build->{httpd});
}
Modified: perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/README
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/README?view=diff&r1=156465&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/README (original)
+++ perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/README Mon Mar 7 15:51:14 2005
@@ -1 +1 @@
-to be written
\ No newline at end of file
+to be written
Modified: perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm?view=diff&r1=156465&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm Mon Mar 7 15:51:14 2005
@@ -26,12 +26,12 @@
our $VERSION = '1.99';
-use Apache::Response ();
-use Apache::RequestRec ();
-use Apache::RequestUtil ();
-use Apache::RequestIO ();
-use Apache::Log ();
-use Apache::Access ();
+use Apache2::Response ();
+use Apache2::RequestRec ();
+use Apache2::RequestUtil ();
+use Apache2::RequestIO ();
+use Apache2::Log ();
+use Apache2::Access ();
use APR::Table ();
@@ -42,7 +42,7 @@
use File::Basename;
use APR::Const -compile => qw(EACCES ENOENT);
-use Apache::Const -compile => qw(:common &OPT_EXECCGI);
+use Apache2::Const -compile => qw(:common &OPT_EXECCGI);
use ModPerl::Const -compile => 'EXIT';
unless (defined $ModPerl::Registry::MarkLine) {
@@ -62,11 +62,11 @@
# the debug level can be overriden on the main server level of
# httpd.conf with:
# PerlSetVar ModPerl::RegistryCooker::DEBUG 4
-use Apache::ServerUtil ();
+use Apache2::ServerUtil ();
use constant DEBUG => 0;
#XXX: below currently crashes the server on win32
-# defined Apache->server->dir_config('ModPerl::RegistryCooker::DEBUG')
-# ? Apache->server->dir_config('ModPerl::RegistryCooker::DEBUG')
+# defined Apache2->server->dir_config('ModPerl::RegistryCooker::DEBUG')
+# ? Apache2->server->dir_config('ModPerl::RegistryCooker::DEBUG')
# : D_NONE;
#########################################################################
@@ -97,7 +97,7 @@
# func: new
# dflt: new
# args: $class - class to bless into
-# $r - Apache::Request object
+# $r - Apache2::RequestRec object
# desc: create the class's object and bless it
# rtrn: the newly created object
#########################################################################
@@ -113,7 +113,7 @@
# func: init
# dflt: init
# desc: initializes the data object's fields: REQ FILENAME URI
-# args: $r - Apache::Request object
+# args: $r - Apache2::RequestRec object
# rtrn: nothing
#########################################################################
@@ -128,11 +128,11 @@
# dflt: handler
# desc: the handler() sub that is expected by Apache
# args: $class - handler's class
-# $r - Apache::Request object
+# $r - Apache2::RequestRec object
# (o)can be called as handler($r) as well (without leading $class)
# rtrn: handler's response status
# note: must be implemented in a sub-class unless configured as
-# Apache::Foo->handler in httpd.conf (because of the
+# Apache2::Foo->handler in httpd.conf (because of the
# __PACKAGE__, which is tied to the file)
#########################################################################
@@ -158,9 +158,9 @@
if ($self->should_compile) {
my $rc = $self->can_compile;
- return $rc unless $rc == Apache::OK;
+ return $rc unless $rc == Apache2::OK;
$rc = $self->convert_script_to_compiled_handler;
- return $rc unless $rc == Apache::OK;
+ return $rc unless $rc == Apache2::OK;
}
# handlers shouldn't set $r->status but return it, so we reset the
@@ -168,7 +168,7 @@
my $old_status = $self->{REQ}->status;
my $rc = $self->run;
my $new_status = $self->{REQ}->status($old_status);
- return ($rc == Apache::OK && $old_status != $new_status)
+ return ($rc == Apache2::OK && $old_status != $new_status)
? $new_status
: $rc;
}
@@ -178,7 +178,7 @@
# dflt: run
# desc: executes the compiled code
# args: $self - registry blessed object
-# rtrn: execution status (Apache::?)
+# rtrn: execution status (Apache2::?)
#########################################################################
sub run {
@@ -196,7 +196,7 @@
%orig_inc = %INC;
}
- my $rc = Apache::OK;
+ my $rc = Apache2::OK;
{ # run the code and preserve warnings setup when it's done
no warnings FATAL => 'all';
#local $^W = 0;
@@ -216,14 +216,14 @@
# use the END blocks return status if the script's execution
# was successful
- $rc = $new_rc if $rc == Apache::OK;
+ $rc = $new_rc if $rc == Apache2::OK;
}
}
if ($self->should_reset_inc_hash) {
# to avoid the bite of require'ing a file with no package delaration
- # Apache::PerlRun in mod_perl 1.15_01 started to localize %INC
+ # Apache2::PerlRun in mod_perl 1.15_01 started to localize %INC
# later on it has been adjusted to preserve loaded .pm files,
# which presumably contained the package declaration
for (keys %INC) {
@@ -235,7 +235,7 @@
$self->flush_namespace;
- #XXX: $self->chdir_file("$Apache::Server::CWD/");
+ #XXX: $self->chdir_file("$Apache2::Server::CWD/");
return $rc;
}
@@ -255,19 +255,19 @@
my $self = shift;
my $r = $self->{REQ};
- return Apache::DECLINED if -d $r->my_finfo;
+ return Apache2::DECLINED if -d $r->my_finfo;
$self->{MTIME} = -M _;
- if (!($r->allow_options & Apache::OPT_EXECCGI)) {
+ if (!($r->allow_options & Apache2::OPT_EXECCGI)) {
$r->log_error("Options ExecCGI is off in this directory",
$self->{FILENAME});
- return Apache::FORBIDDEN;
+ return Apache2::FORBIDDEN;
}
$self->debug("can compile $self->{FILENAME}") if DEBUG & D_NOISE;
- return Apache::OK;
+ return Apache2::OK;
}
#########################################################################
@@ -362,13 +362,13 @@
sub convert_script_to_compiled_handler {
my $self = shift;
- my $rc = Apache::OK;
+ my $rc = Apache2::OK;
$self->debug("Adding package $self->{PACKAGE}") if DEBUG & D_NOISE;
# get the script's source
$rc = $self->read_script;
- return $rc unless $rc == Apache::OK;
+ return $rc unless $rc == Apache2::OK;
# convert the shebang line opts into perl code
$self->rewrite_shebang;
@@ -402,10 +402,10 @@
"\n}"; # last line comment without newline?
$rc = $self->compile(\$eval);
- return $rc unless $rc == Apache::OK;
+ return $rc unless $rc == Apache2::OK;
$self->debug(qq{compiled package \"$self->{PACKAGE}\"}) if DEBUG & D_NOISE;
- #$self->chdir_file("$Apache::Server::CWD/");
+ #$self->chdir_file("$Apache2::Server::CWD/");
# if(my $opt = $r->dir_config("PerlRunOnce")) {
# $r->child_terminate if lc($opt) eq "on";
@@ -527,7 +527,7 @@
# dflt: read_script
# desc: reads the script in
# args: $self - registry blessed object
-# rtrn: Apache::OK on success, some other code on failure
+# rtrn: Apache2::OK on success, some other code on failure
# efct: initializes the CODE field with the source script
#########################################################################
@@ -541,15 +541,15 @@
$self->log_error("$@");
if (ref $@ eq 'APR::Error') {
- return Apache::FORBIDDEN if $@ == APR::EACCES;
- return Apache::NOT_FOUND if $@ == APR::ENOENT;
+ return Apache2::FORBIDDEN if $@ == APR::EACCES;
+ return Apache2::NOT_FOUND if $@ == APR::ENOENT;
}
else {
- return Apache::SERVER_ERROR;
+ return Apache2::SERVER_ERROR;
}
}
- return Apache::OK;
+ return Apache2::OK;
}
#########################################################################
@@ -564,8 +564,8 @@
my %switches = (
'T' => sub {
- Apache::ServerRec::warn("-T switch is ignored, enable " .
- "with 'PerlSwitches -T' in httpd.conf\n")
+ Apache2::ServerRec::warn("-T switch is ignored, enable " .
+ "with 'PerlSwitches -T' in httpd.conf\n")
unless ${^TAINT};
"";
},
@@ -680,7 +680,7 @@
# dflt: error_check
# desc: checks $@ for errors
# args: $self - registry blessed object
-# rtrn: Apache::SERVER_ERROR if $@ is set, Apache::OK otherwise
+# rtrn: Apache2::SERVER_ERROR if $@ is set, Apache2::OK otherwise
#########################################################################
sub error_check {
@@ -691,9 +691,9 @@
# (see modperl_perl_exit() and modperl_errsv() C functions)
if ($@ && !(ref $@ eq 'APR::Error' && $@ == ModPerl::EXIT)) {
$self->log_error($@);
- return Apache::SERVER_ERROR;
+ return Apache2::SERVER_ERROR;
}
- return Apache::OK;
+ return Apache2::OK;
}
@@ -762,23 +762,23 @@
my($class) = __PACKAGE__->cache_table_common();
unless (defined $class) {
- Apache->warn("$$: cannot figure out cache symbol table for $package");
+ Apache2->warn("$$: cannot figure out cache symbol table for $package");
return;
}
if (exists $class->{$package} && exists $class->{$package}{mtime}) {
- Apache->warn("$$: uncaching $package\n") if DEBUG & D_COMPILE;
+ Apache2->warn("$$: uncaching $package\n") if DEBUG & D_COMPILE;
delete $class->{$package}{mtime};
}
else {
- Apache->warn("$$: cannot find $package in cache");
+ Apache2->warn("$$: cannot find $package in cache");
}
}
# XXX: should go away when finfo() is ported to 2.0 (don't want to
# depend on compat.pm)
-sub Apache::RequestRec::my_finfo {
+sub Apache2::RequestRec::my_finfo {
my $r = shift;
stat $r->filename;
\*_;
Modified: perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/lib/ModPerl/RegistryLoader.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/lib/ModPerl/RegistryLoader.pm?view=diff&r1=156465&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/lib/ModPerl/RegistryLoader.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/lib/ModPerl/RegistryLoader.pm Mon Mar 7 15:51:14 2005
@@ -18,13 +18,13 @@
use warnings;
use ModPerl::RegistryCooker ();
-use Apache::ServerUtil ();
+use Apache2::ServerUtil ();
use APR::Pool ();
use Carp;
use File::Spec ();
-use Apache::Const -compile => qw(OK HTTP_OK OPT_EXECCGI);
+use Apache2::Const -compile => qw(OK HTTP_OK OPT_EXECCGI);
our @ISA = ();
@@ -71,7 +71,7 @@
$self->warn("Trying to guess filename based on uri")
if $self->{debug};
- $filename = File::Spec->catfile(Apache::ServerUtil::server_root,
+ $filename = File::Spec->catfile(Apache2::ServerUtil::server_root,
$guess);
unless (-e $filename) {
$self->warn("Cannot find guessed file: $filename",
@@ -108,13 +108,13 @@
sub get_server_name { return $_[0]->{virthost} if exists $_[0]->{virthost} }
sub filename { shift->{filename} }
-sub status { Apache::HTTP_OK }
+sub status { Apache2::HTTP_OK }
sub my_finfo { shift->{filename} }
sub uri { shift->{uri} }
sub path_info {}
-sub allow_options { Apache::OPT_EXECCGI } #will be checked again at run-time
+sub allow_options { Apache2::OPT_EXECCGI } #will be checked again at run-time
sub log_error { shift; die @_ if $@; warn @_; }
-sub run { return Apache::OK } # don't run the script
+sub run { return Apache2::OK } # don't run the script
sub server { shift }
sub is_virtual { exists shift->{virthost} }
@@ -153,7 +153,7 @@
sub warn {
my $self = shift;
- Apache->warn(__PACKAGE__ . ": @_\n");
+ Apache2->warn(__PACKAGE__ . ": @_\n");
}
1;
Modified: perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/t/TEST.PL
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/t/TEST.PL?view=diff&r1=156465&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/t/TEST.PL (original)
+++ perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/t/TEST.PL Mon Mar 7 15:51:14 2005
@@ -24,12 +24,12 @@
use File::Spec::Functions qw(catdir);
use File::Basename qw(dirname);
-use Apache::Build;
+use Apache2::Build;
# default timeout in secs (threaded mpms are extremely slow to
# startup, due to a slow perl_clone operation)
use constant DEFAULT_STARTUP_TIMEOUT =>
- Apache::Build->build_config->mpm_is_threaded() ? 180 : 90;
+ Apache2::Build->build_config->mpm_is_threaded() ? 180 : 90;
# subclass new_test_config to add some config vars which will be
# replaced in generated httpd.conf
Modified: perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Build.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Build.pm?view=diff&r1=156220&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Build.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Build.pm Mon Mar 7 15:51:14 2005
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-package Apache::Build;
+package Apache2::Build;
use 5.006;
use strict;
@@ -25,7 +25,7 @@
use File::Basename;
use ExtUtils::Embed ();
-use constant IS_MOD_PERL_BUILD => grep { -e "$_/lib/mod_perl.pm" } qw(. ..);
+use constant IS_MOD_PERL_BUILD => grep { -e "$_/lib/mod_perl2.pm" } qw(. ..);
use constant AIX => $^O eq 'aix';
use constant DARWIN => $^O eq 'darwin';
@@ -109,7 +109,7 @@
$apxs = ''; # not found
- my @trys = ($Apache::Build::APXS,
+ my @trys = ($Apache2::Build::APXS,
$self->{MP_APXS},
$ENV{MP_APXS},
catfile $self->{MP_AP_PREFIX}, 'bin', 'apxs');
@@ -665,7 +665,7 @@
my $name = shift;
for (@INC) {
my $file;
- if (-e ($file = "$_/auto/Apache/$name")) {
+ if (-e ($file = "$_/auto/Apache2/$name")) {
return $file;
}
}
@@ -768,7 +768,7 @@
#--- constructors ---
-my $bpm = 'Apache/BuildConfig.pm';
+my $bpm = 'Apache2/BuildConfig.pm';
sub build_config {
my $self = shift;
@@ -780,15 +780,15 @@
#reload if Makefile.PL has regenerated
unshift @INC, 'lib';
delete $INC{$bpm};
- eval { require Apache::BuildConfig; };
+ eval { require Apache2::BuildConfig; };
shift @INC;
}
else {
- eval { require Apache::BuildConfig; };
+ eval { require Apache2::BuildConfig; };
}
return bless {}, (ref($self) || $self) if $@;
- return Apache::BuildConfig::->new;
+ return Apache2::BuildConfig::->new;
}
sub new {
@@ -810,7 +810,7 @@
sub DESTROY {}
my %default_files = (
- 'build_config' => 'lib/Apache/BuildConfig.pm',
+ 'build_config' => 'lib/Apache2/BuildConfig.pm',
'ldopts' => 'src/modules/perl/ldopts',
'makefile' => 'src/modules/perl/Makefile',
);
@@ -872,14 +872,14 @@
open my $fh, '>', $file or die "open $file: $!";
#work around autosplit braindeadness
- my $package = 'package Apache::BuildConfig';
+ my $package = 'package Apache2::BuildConfig';
print $fh noedit_warning_hash();
print $fh <<EOF;
$package;
-use Apache::Build ();
+use Apache2::Build ();
sub new {
$obj;
@@ -898,7 +898,7 @@
print "Running: $command\n";
system $command;
}
-# % perl -MApache::Build -e rebuild
+# % perl -MApache2::Build -e rebuild
*main::rebuild = \&rebuild if $0 eq '-e';
#--- attribute access ---
@@ -945,7 +945,7 @@
# might end up finding 1.x headers anyhow
# unless ($dir and -d $dir) {
# for (@INC) {
-# last if -d ($dir = "$_/auto/Apache/include");
+# last if -d ($dir = "$_/auto/Apache2/include");
# }
# }
return $self->{dir} = $dir ? canonpath(rel2abs $dir) : undef;
@@ -1176,14 +1176,14 @@
sub mmn_eq {
my($class, $dir) = @_;
- return 1 if WIN32; #just assume, till Apache::Build works under win32
+ return 1 if WIN32; #just assume, till Apache2::Build works under win32
my $instsrc;
{
local @INC = grep { !/blib/ } @INC;
my $instdir;
for (@INC) {
- last if -d ($instdir = "$_/auto/Apache/include");
+ last if -d ($instdir = "$_/auto/Apache2/include");
}
$instsrc = $class->new(dir => $instdir);
}
@@ -1808,7 +1808,7 @@
for (@INC) {
# make sure not to pick mod_perl 1.0 typemap
next if $self->{MP_INST_APACHE2} && $_ !~ /Apache2$/;
- my $file = "$_/auto/Apache/typemap";
+ my $file = "$_/auto/Apache2/typemap";
push @typemaps, $file if -e $file;
}
@@ -2025,16 +2025,16 @@
=head1 NAME
-Apache::Build - Methods for locating and parsing bits of Apache source code
+Apache2::Build - Methods for locating and parsing bits of Apache source code
=head1 SYNOPSIS
- use Apache::Build ();
- my $build = Apache::Build->new;
+ use Apache2::Build ();
+ my $build = Apache2::Build->new;
# rebuild mod_perl with build opts from the previous build
% cd modperl-2.0
- % perl -MApache::Build -e rebuild
+ % perl -MApache2::Build -e rebuild
=head1 DESCRIPTION
@@ -2046,12 +2046,12 @@
chdir to the mod_perl source directory and run:
% cd modperl-2.0
- % perl -MApache::Build -e rebuild
+ % perl -MApache2::Build -e rebuild
If you want to rebuild not yet installed, but already built mod_perl,
run from its root directory:
- % perl -Ilib -MApache::Build -e rebuild
+ % perl -Ilib -MApache2::Build -e rebuild
=head1 METHODS
@@ -2059,9 +2059,9 @@
=item new
-Create an object blessed into the B<Apache::Build> class.
+Create an object blessed into the B<Apache2::Build> class.
- my $build = Apache::Build->new;
+ my $build = Apache2::Build->new;
=item dir
@@ -2090,12 +2090,12 @@
use ExtUtils::MakeMaker;
- use Apache::Build ();
+ use Apache2::Build ();
WriteMakefile(
- 'NAME' => 'Apache::Module',
+ 'NAME' => 'Apache2::Module',
'VERSION' => '0.01',
- 'INC' => Apache::Build->new->inc,
+ 'INC' => Apache2::Build->new->inc,
);
@@ -2126,14 +2126,14 @@
use ExtUtils::MakeMaker;
- use Apache::Build ();
+ use Apache2::Build ();
WriteMakefile(
- 'NAME' => 'Apache::Module',
+ 'NAME' => 'Apache2::Module',
'VERSION' => '0.01',
- 'INC' => Apache::Build->new->inc,
+ 'INC' => Apache2::Build->new->inc,
'dynamic_lib' => {
- 'OTHERLDFLAGS' => Apache::Build->new->otherldflags,
+ 'OTHERLDFLAGS' => Apache2::Build->new->otherldflags,
},
);
Modified: perl/modperl/branches/apache2-rename-unstable/lib/Apache2/ParseSource.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/Apache2/ParseSource.pm?view=diff&r1=156220&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/Apache2/ParseSource.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/Apache2/ParseSource.pm Mon Mar 7 15:51:14 2005
@@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-package Apache::ParseSource;
+package Apache2::ParseSource;
use strict;
use warnings FATAL => 'all';
-use Apache::Build ();
+use Apache2::Build ();
use Config;
use File::Basename;
use File::Spec::Functions qw(catdir);
@@ -28,14 +28,14 @@
my $class = shift;
my $self = bless {
- config => Apache::Build->build_config,
+ config => Apache2::Build->build_config,
@_,
}, $class;
my $prefixes = join '|', @{ $self->{prefixes} || [qw(ap_ apr_)] };
$self->{prefix_re} = qr{^($prefixes)};
- $Apache::Build::APXS ||= $self->{apxs};
+ $Apache2::Build::APXS ||= $self->{apxs};
$self;
}
@@ -58,7 +58,7 @@
}
{
- package Apache::ParseSource::Scan;
+ package Apache2::ParseSource::Scan;
our @ISA = qw(ModPerl::CScan);
@@ -109,7 +109,7 @@
$c->set(Defines => join ' ', map "-D$_", @defines);
- bless $c, 'Apache::ParseSource::Scan';
+ bless $c, 'Apache2::ParseSource::Scan';
}
sub include_dirs {
@@ -202,7 +202,7 @@
my $dir = $File::Find::dir;
push @includes, "$dir/$_";
},
- (Apache::Build::WIN32 ? '' : follow => 1),
+ (Apache2::Build::WIN32 ? '' : follow => 1),
}, $dir);
}
return @includes;
@@ -227,7 +227,7 @@
}
my %defines_wanted = (
- Apache => {
+ Apache2 => {
common => [qw{OK DECLINED DONE}],
config => [qw{DECLINE_CMD}],
context => [qw(NOT_IN_ GLOBAL_ONLY)],
@@ -273,7 +273,7 @@
}
my %enums_wanted = (
- Apache => { map { $_, 1 } qw(cmd_how input_mode filter_type conn_keepalive) },
+ Apache2 => { map { $_, 1 } qw(cmd_how input_mode filter_type conn_keepalive) },
APR => { map { $_, 1 } qw(apr_shutdown_how apr_read_type apr_lockmech) },
);
@@ -305,7 +305,7 @@
#maintain a few handy shortcuts from 1.xx
#aliases are defined in ModPerl::Code
- push @{ $constants{'Apache'}->{common} },
+ push @{ $constants{'Apache2'}->{common} },
qw(NOT_FOUND FORBIDDEN AUTH_REQUIRED SERVER_ERROR REDIRECT);
return \%constants;
@@ -490,7 +490,7 @@
sub write_functions_pm {
my $self = shift;
my $file = shift || 'FunctionTable.pm';
- my $name = shift || 'Apache::FunctionTable';
+ my $name = shift || 'Apache2::FunctionTable';
$self->write_pm($file, $name, $self->get_functions);
}
@@ -498,7 +498,7 @@
sub write_structs_pm {
my $self = shift;
my $file = shift || 'StructureTable.pm';
- my $name = shift || 'Apache::StructureTable';
+ my $name = shift || 'Apache2::StructureTable';
$self->write_pm($file, $name, $self->get_structs);
}
@@ -506,7 +506,7 @@
sub write_constants_pm {
my $self = shift;
my $file = shift || 'ConstantsTable.pm';
- my $name = shift || 'Apache::ConstantsTable';
+ my $name = shift || 'Apache2::ConstantsTable';
$self->write_pm($file, $name, $self->get_constants);
}
Modified: perl/modperl/branches/apache2-rename-unstable/lib/Apache2/PerlSections.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/Apache2/PerlSections.pm?view=diff&r1=156220&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/Apache2/PerlSections.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/Apache2/PerlSections.pm Mon Mar 7 15:51:14 2005
@@ -12,22 +12,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-package Apache::PerlSections;
+package Apache2::PerlSections;
use strict;
use warnings FATAL => 'all';
our $VERSION = '2.00';
-use Apache::CmdParms ();
-use Apache::Directive ();
+use Apache2::CmdParms ();
+use Apache2::Directive ();
use APR::Table ();
-use Apache::ServerRec ();
-use Apache::ServerUtil ();
-use Apache::Const -compile => qw(OK);
+use Apache2::ServerRec ();
+use Apache2::ServerUtil ();
+use Apache2::Const -compile => qw(OK);
use constant SPECIAL_NAME => 'PerlConfig';
-use constant SPECIAL_PACKAGE => 'Apache::ReadConfig';
+use constant SPECIAL_PACKAGE => 'Apache2::ReadConfig';
sub new {
my($package, @args) = @_;
@@ -39,7 +39,7 @@
sub package { return shift->{'args'}->{'package'} }
my @saved;
-sub save { return $Apache::PerlSections::Save }
+sub save { return $Apache2::PerlSections::Save }
sub saved { return @saved }
sub handler : method {
@@ -71,7 +71,7 @@
$self->post_config();
- Apache::OK;
+ Apache2::OK;
}
sub symdump {
@@ -83,7 +83,7 @@
$self->{symbols} = [];
#XXX: Here would be a good place to warn about NOT using
- # Apache::ReadConfig:: directly in <Perl> sections
+ # Apache2::ReadConfig:: directly in <Perl> sections
foreach my $pack ($self->package, $self->SPECIAL_PACKAGE) {
#XXX: Shamelessly borrowed from Devel::Symdump;
while (my ($key, $val) = each(%{ *{"$pack\::"} })) {
@@ -206,14 +206,14 @@
sub dump {
my $class = shift;
- require Apache::PerlSections::Dump;
- return Apache::PerlSections::Dump->dump(@_);
+ require Apache2::PerlSections::Dump;
+ return Apache2::PerlSections::Dump->dump(@_);
}
sub store {
my $class = shift;
- require Apache::PerlSections::Dump;
- return Apache::PerlSections::Dump->store(@_);
+ require Apache2::PerlSections::Dump;
+ return Apache2::PerlSections::Dump->store(@_);
}
1;
Modified: perl/modperl/branches/apache2-rename-unstable/lib/Apache2/PerlSections/Dump.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/Apache2/PerlSections/Dump.pm?view=diff&r1=156220&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/Apache2/PerlSections/Dump.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/Apache2/PerlSections/Dump.pm Mon Mar 7 15:51:14 2005
@@ -12,15 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-package Apache::PerlSections::Dump;
+package Apache2::PerlSections::Dump;
use strict;
use warnings FATAL => 'all';
our $VERSION = '0.01';
-use Apache::PerlSections;
-our @ISA = qw(Apache::PerlSections);
+use Apache2::PerlSections;
+our @ISA = qw(Apache2::PerlSections);
use Data::Dumper;
Modified: perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Reload.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Reload.pm?view=diff&r1=156220&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Reload.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Reload.pm Mon Mar 7 15:51:14 2005
@@ -12,26 +12,26 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-package Apache::Reload;
+package Apache2::Reload;
use strict;
use warnings FATAL => 'all';
-use mod_perl 1.99;
+use mod_perl2;
our $VERSION = '0.09';
-use Apache::Const -compile => qw(OK);
+use Apache2::Const -compile => qw(OK);
-use Apache::Connection;
-use Apache::ServerUtil;
-use Apache::RequestUtil;
+use Apache2::Connection;
+use Apache2::ServerUtil;
+use Apache2::RequestUtil;
use ModPerl::Util ();
use vars qw(%INCS %Stat $TouchTime);
-%Stat = ($INC{"Apache/Reload.pm"} => time);
+%Stat = ($INC{"Apache2/Reload.pm"} => time);
$TouchTime = time;
@@ -81,7 +81,7 @@
# $r if invoked as 'PerlInitHandler'
sub handler {
my $o = shift;
- $o = $o->base_server if ref($o) eq 'Apache::Connection';
+ $o = $o->base_server if ref($o) eq 'Apache2::Connection';
my $DEBUG = ref($o) && (lc($o->dir_config("ReloadDebug") || '') eq 'on');
@@ -104,10 +104,10 @@
}
if (ref($o) && (lc($o->dir_config("ReloadAll") || 'on') eq 'on')) {
- *Apache::Reload::INCS = \%INC;
+ *Apache2::Reload::INCS = \%INC;
}
else {
- *Apache::Reload::INCS = \%INCS;
+ *Apache2::Reload::INCS = \%INCS;
my $ExtraList =
$TouchModules ||
(ref($o) && $o->dir_config("ReloadModules")) ||
@@ -119,22 +119,22 @@
$prefix =~ s/::/\//g;
foreach my $match (keys %INC) {
if ($match =~ /^\Q$prefix\E/) {
- $Apache::Reload::INCS{$match} = $INC{$match};
+ $Apache2::Reload::INCS{$match} = $INC{$match};
}
}
}
else {
- Apache::Reload->register_module($_);
+ Apache2::Reload->register_module($_);
}
}
}
my $ReloadDirs = ref($o) && $o->dir_config("ReloadDirectories");
my @watch_dirs = split(/\s+/, $ReloadDirs||'');
- while (my($key, $file) = each %Apache::Reload::INCS) {
+ while (my($key, $file) = each %Apache2::Reload::INCS) {
next unless defined $file;
next if @watch_dirs && !grep { $file =~ /^$_/ } @watch_dirs;
- warn "Apache::Reload: Checking mtime of $key\n" if $DEBUG;
+ warn "Apache2::Reload: Checking mtime of $key\n" if $DEBUG;
my $mtime = (stat $file)[9];
@@ -145,7 +145,7 @@
}
}
- warn("Apache::Reload: Can't locate $file\n"), next
+ warn("Apache2::Reload: Can't locate $file\n"), next
unless defined $mtime and $mtime;
unless (defined $Stat{$file}) {
@@ -156,13 +156,13 @@
my $package = module_to_package($key);
ModPerl::Util::unload_package($package);
require $key;
- warn("Apache::Reload: process $$ reloading $package from $key\n")
+ warn("Apache2::Reload: process $$ reloading $package from $key\n")
if $DEBUG;
}
$Stat{$file} = $mtime;
}
- return Apache::OK;
+ return Apache2::OK;
}
1;
Modified: perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Resource.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Resource.pm?view=diff&r1=156220&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Resource.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Resource.pm Mon Mar 7 15:51:14 2005
@@ -13,20 +13,20 @@
# limitations under the License.
#
-package Apache::Resource;
+package Apache2::Resource;
use strict;
use warnings FATAL => 'all';
-use mod_perl 1.99;
+use mod_perl2;
-use Apache::Module ();
+use Apache2::Module ();
use BSD::Resource qw(setrlimit getrlimit get_rlimits);
-use Apache::Const -compile => qw(OK);
+use Apache2::Const -compile => qw(OK);
-$Apache::Resource::VERSION = '1.72';
+$Apache2::Resource::VERSION = '1.72';
our $Debug;
@@ -74,7 +74,7 @@
$hard ||= $soft;
- debug "Apache::Resource: PID $$ attempting to set `$name'=$soft:$hard ...";
+ debug "Apache2::Resource: PID $$ attempting to set `$name'=$soft:$hard ...";
($soft, $hard) = (MB $soft, MB $hard) if $is_mb{$name};
@@ -95,11 +95,11 @@
debug $@ if $@;
}
- Apache::OK;
+ Apache2::OK;
}
sub default_handler {
- while (my($k, $v) = each %Apache::Resource::) {
+ while (my($k, $v) = each %Apache2::Resource::) {
next unless $k =~ s/^DEFAULT_/PERL_/;
$ENV{$k} = "";
}
@@ -123,23 +123,23 @@
}
push @retval, "</table><P>";
- push @retval, "<small>Apache::Resource $Apache::Resource::VERSION</small>";
+ push @retval, "<small>Apache2::Resource $Apache2::Resource::VERSION</small>";
return \@retval;
}
if ($ENV{MOD_PERL}) {
if ($ENV{PERL_RLIMIT_DEFAULTS}) {
- Apache->server->push_handlers(
+ Apache2->server->push_handlers(
PerlChildInitHandler => \&default_handler);
}
- Apache::Status->menu_item(rlimit => "Resource Limits",
+ Apache2::Status->menu_item(rlimit => "Resource Limits",
\&status_rlimit)
- if Apache::Module::loaded("Apache::Status");
+ if Apache2::Module::loaded("Apache2::Status");
}
-# perl Apache/Resource.pm
+# perl Apache2/Resource.pm
++$Debug, default_handler unless caller();
1;
Modified: perl/modperl/branches/apache2-rename-unstable/lib/Apache2/SizeLimit.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/Apache2/SizeLimit.pm?view=diff&r1=156220&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/Apache2/SizeLimit.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/Apache2/SizeLimit.pm Mon Mar 7 15:51:14 2005
@@ -12,16 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-package Apache::SizeLimit;
+package Apache2::SizeLimit;
use strict;
use warnings FATAL => 'all';
-use mod_perl 1.99;
+use mod_perl2;
-use Apache::RequestRec ();
-use Apache::RequestUtil ();
-use Apache::MPM ();
+use Apache2::RequestRec ();
+use Apache2::RequestUtil ();
+use Apache2::MPM ();
use APR::Pool ();
use ModPerl::Util ();
@@ -32,7 +32,7 @@
use constant LINUX => $^O eq 'linux';
use constant BSD_LIKE => $^O =~ /(bsd|aix|darwin)/i;
-use Apache::Const -compile => qw(OK DECLINED);
+use Apache2::Const -compile => qw(OK DECLINED);
our $VERSION = '0.04';
@@ -46,8 +46,8 @@
BEGIN {
- die "Apache::SizeLimit at the moment works only with non-threaded MPMs"
- if Apache::MPM->is_threaded();
+ die "Apache2::SizeLimit at the moment works only with non-threaded MPMs"
+ if Apache2::MPM->is_threaded();
# decide at compile time how to check for a process' memory size.
if (SOLARIS && $Config{'osvers'} >= 2.6) {
@@ -64,7 +64,7 @@
if ( eval { require BSD::Resource } ) {
$HOW_BIG_IS_IT = \&bsd_size_check;
} else {
- die "you must install BSD::Resource for Apache::SizeLimit " .
+ die "you must install BSD::Resource for Apache2::SizeLimit " .
"to work on your platform.";
}
@@ -74,13 +74,13 @@
# if ( eval { require Win32::API } ) {
# $HOW_BIG_IS_IT = \&win32_size_check;
# } else {
-# die "you must install Win32::API for Apache::SizeLimit " .
+# die "you must install Win32::API for Apache2::SizeLimit " .
# "to work on your platform.";
# }
} else {
- die "Apache::SizeLimit not implemented on $^O";
+ die "Apache2::SizeLimit not implemented on $^O";
}
}
@@ -152,9 +152,9 @@
sub exit_if_too_big {
my $r = shift;
- #warn "Apache::Size::Limit exit sub called";
+ #warn "Apache2::Size::Limit exit sub called";
- return Apache::DECLINED if $CHECK_EVERY_N_REQUESTS &&
+ return Apache2::DECLINED if $CHECK_EVERY_N_REQUESTS &&
($REQUEST_COUNT++ % $CHECK_EVERY_N_REQUESTS);
$START_TIME ||= time;
@@ -182,14 +182,14 @@
}
}
- return Apache::OK;
+ return Apache2::OK;
}
# setmax can be called from within a CGI/Registry script to tell the httpd
# to exit if the CGI causes the process to grow too big.
sub setmax {
$MAX_PROCESS_SIZE = shift;
- my $r = shift || Apache->request();
+ my $r = shift || Apache2->request();
unless ($r->pnotes('size_limit_cleanup')) {
$r->pool->cleanup_register(\&exit_if_too_big, $r);
$r->pnotes('size_limit_cleanup', 1);
@@ -198,7 +198,7 @@
sub setmin {
$MIN_SHARE_SIZE = shift;
- my $r = shift || Apache->request();
+ my $r = shift || Apache2->request();
unless ($r->pnotes('size_limit_cleanup')) {
$r->pool->cleanup_register(\&exit_if_too_big, $r);
$r->pnotes('size_limit_cleanup', 1);
@@ -207,7 +207,7 @@
sub setmax_unshared {
$MAX_UNSHARED_SIZE = shift;
- my $r = shift || Apache->request();
+ my $r = shift || Apache2->request();
unless ($r->pnotes('size_limit_cleanup')) {
$r->pool->cleanup_register(\&exit_if_too_big, $r);
$r->pnotes('size_limit_cleanup', 1);
@@ -226,12 +226,12 @@
}
}
- return Apache::DECLINED;
+ return Apache2::DECLINED;
}
sub error_log {
print STDERR "[", scalar(localtime time),
- "] ($$) Apache::SizeLimit @_\n";
+ "] ($$) Apache2::SizeLimit @_\n";
}
1;
Modified: perl/modperl/branches/apache2-rename-unstable/lib/Apache2/SourceTables.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/Apache2/SourceTables.pm?view=diff&r1=156220&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/Apache2/SourceTables.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/Apache2/SourceTables.pm Mon Mar 7 15:51:14 2005
@@ -12,19 +12,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-package Apache::SourceTables;
+package Apache2::SourceTables;
-use Apache::StructureTable ();
-use Apache::FunctionTable ();
+use Apache2::StructureTable ();
+use Apache2::FunctionTable ();
#build hash versions of the tables
-%Apache::StructureTable =
- map { $_->{type}, $_->{elts} } @$Apache::StructureTable;
+%Apache2::StructureTable =
+ map { $_->{type}, $_->{elts} } @$Apache2::StructureTable;
-%Apache::FunctionTable =
+%Apache2::FunctionTable =
map { $_->{name}, {elts => $_->{elts},
return_type => $_->{return_type} } }
- @$Apache::FunctionTable;
+ @$Apache2::FunctionTable;
1;
__END__
Modified: perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Status.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Status.pm?view=diff&r1=156220&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Status.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Status.pm Mon Mar 7 15:51:14 2005
@@ -12,31 +12,31 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-package Apache::Status;
+package Apache2::Status;
use strict;
use warnings FATAL => 'all';
-use mod_perl 1.99;
+use mod_perl2;
-use Apache::RequestIO ();
-use Apache::RequestRec ();
-use Apache::RequestUtil ();
-use Apache::ServerUtil ();
+use Apache2::RequestIO ();
+use Apache2::RequestRec ();
+use Apache2::RequestUtil ();
+use Apache2::ServerUtil ();
use File::Spec ();
-use Apache::Const -compile => qw(OK);
+use Apache2::Const -compile => qw(OK);
-$Apache::Status::VERSION = '3.00'; # mod_perl 2.0
+$Apache2::Status::VERSION = '3.00'; # mod_perl 2.0
use constant IS_WIN32 => ($^O eq "MSWin32");
our $newQ;
-if (parse_version("Apache::Request") > 2 &&
- eval { require Apache::Request }) {
- $newQ ||= sub { Apache::Request->new(@_) };
+if (parse_version("Apache2::Request") > 2 &&
+ eval { require Apache2::Request }) {
+ $newQ ||= sub { Apache2::Request->new(@_) };
}
elsif (eval { require CGI }) {
if ($CGI::VERSION >= 2.93) {
@@ -47,7 +47,7 @@
}
}
else {
- die "Need CGI.pm or Apache::Request to operate";
+ die "Need CGI.pm or Apache2::Request to operate";
}
my %status = (
@@ -62,12 +62,13 @@
myconfig => "Perl Configuration",
hooks => "Enabled mod_perl Hooks",
);
-
-delete $status{'hooks'} if $mod_perl::VERSION >= 1.9901;
+# XXX: is $status{hooks} supported with any mp2 version?
+# If not, why not just remove it from the above initialization?
+delete $status{'hooks'} if $mod_perl2::VERSION >= 1.9901;
delete $status{'sig'} if IS_WIN32;
# XXX: needs porting
-if ($Apache::PerlSections::Save) {
+if ($Apache2::PerlSections::Save) {
$status{"section_config"} = "Perl Section Configuration";
}
@@ -83,7 +84,7 @@
terse => ["StatusTerse", "B::Terse", 0, ],
tersesize => ["StatusTerseSize", "B::TerseSize", 0, ],
packagesize => ["StatusPackageSize", "B::TerseSize", 0, ],
- peek => ["StatusPeek", "Apache::Peek", 0, ], # XXX: version?
+ peek => ["StatusPeek", "Apache2::Peek", 0, ], # XXX: version?
);
sub has {
@@ -128,14 +129,14 @@
sub handler {
my($r) = @_;
- #Apache->request($r); #for Apache::CGI
+ #Apache2->request($r); #for Apache2::CGI
my $qs = $r->args || "";
my $sub = "status_$qs";
no strict 'refs';
if ($qs =~ s/^(noh_\w+).*/$1/) {
&{$qs}($r, $newQ->($r));
- return Apache::OK;
+ return Apache2::OK;
}
header($r);
@@ -155,20 +156,20 @@
}
$r->print("</body></html>");
- Apache::OK;
+ Apache2::OK;
}
sub header {
my $r = shift;
my $start = scalar localtime $^T;
- my $srv = Apache::ServerUtil::get_server_version();
+ my $srv = Apache2::ServerUtil::get_server_version();
$r->content_type("text/html");
my $v = $^V ? sprintf "v%vd", $^V : $];
$r->print(<<"EOF");
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
- <title>Apache::Status</title>
+ <title>Apache2::Status</title>
<style type="text/css">
body {
color: #000;
@@ -199,7 +200,7 @@
my $meth = lc($r->dir_config("StatusRdump")) eq "on"
? "rnew" : "new";
my $sob = Devel::Symdump->$meth($package);
- return $sob->Apache::Status::as_HTML($package, $r, $q);
+ return $sob->Apache2::Status::as_HTML($package, $r, $q);
}
sub status_symdump {
@@ -209,8 +210,8 @@
sub status_section_config {
my($r, $q) = @_;
- require Apache::PerlSections;
- ["<pre>", Apache::PerlSections->dump, "</pre>"];
+ require Apache2::PerlSections;
+ ["<pre>", Apache2::PerlSections->dump, "</pre>"];
}
sub status_hooks {
@@ -244,7 +245,7 @@
local $^W = 0;
next if $file =~ m:^/:;
next unless $file =~ m:\.pm:;
- next unless $INC{$file}; #e.g. fake Apache/TieHandle.pm
+ next unless $INC{$file}; #e.g. fake Apache2/TieHandle.pm
no strict 'refs';
(my $module = $file) =~ s,/,::,g;
@@ -288,7 +289,7 @@
# XXX: generalize
$RegistryCache = $cache if $cache;
- $RegistryCache || $Apache::Registry;
+ $RegistryCache || $Apache2::Registry;
}
sub get_packages_per_handler {
@@ -374,8 +375,8 @@
(map {
my $val = $SIG{$_} || "";
if ($val and ref $val eq "CODE") {
- # XXX: 2.0 doesn't have Apache::Symbol
- if (my $cv = Apache::Symbol->can('sv_name')) {
+ # XXX: 2.0 doesn't have Apache2::Symbol
+ if (my $cv = Apache2::Symbol->can('sv_name')) {
$val = "\\&". $cv->($val);
}
}
@@ -661,7 +662,7 @@
my($name, $type) = (split "/", $r->uri)[-2,-1];
$type =~ s/^FUNCTION$/CODE/;
$r->print("Peek Dump of $name $type\n\n");
- Apache::Peek::Dump(*{$name}{$type});
+ Apache2::Peek::Dump(*{$name}{$type});
}
sub xref_link {
@@ -684,10 +685,10 @@
B::Xref::compile($thing)->();
}
-$Apache::Status::BGraphCache ||= 0;
-if ($Apache::Status::BGraphCache) {
- Apache->push_handlers(PerlChildExitHandler => sub {
- unlink keys %Apache::Status::BGraphCache;
+$Apache2::Status::BGraphCache ||= 0;
+if ($Apache2::Status::BGraphCache) {
+ Apache2->push_handlers(PerlChildExitHandler => sub {
+ unlink keys %Apache2::Status::BGraphCache;
});
}
@@ -707,7 +708,7 @@
untie *STDOUT;
- my $dir = File::Spec->catfile(Apache::ServerUtil::server_root(),
+ my $dir = File::Spec->catfile(Apache2::ServerUtil::server_root(),
($r->dir_config("GraphDir") || "logs/b_graphs"));
mkdir $dir, 0755 unless -d $dir;
@@ -731,8 +732,8 @@
$r->content_type("text/plain");
$r->print("Graph of $thing failed!\n");
}
- if ($Apache::Status::BGraphCache) {
- $Apache::Status::BGraphCache{$file}++;
+ if ($Apache2::Status::BGraphCache) {
+ $Apache2::Status::BGraphCache{$file}++;
}
else {
unlink $file;
@@ -887,7 +888,7 @@
next unless /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/;
{ local($1, $2); ($_ = $_) = /(.*)/; } # untaint
my $eval = qq{
- package Apache::Status::_version;
+ package Apache2::Status::_version;
no strict;
local $1$2;
Modified: perl/modperl/branches/apache2-rename-unstable/lib/Apache2/XSLoader.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/Apache2/XSLoader.pm?view=diff&r1=156220&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/Apache2/XSLoader.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/Apache2/XSLoader.pm Mon Mar 7 15:51:14 2005
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-package Apache::XSLoader;
+package Apache2::XSLoader;
use strict;
use warnings FATAL => 'all';
Modified: perl/modperl/branches/apache2-rename-unstable/lib/Apache2/compat.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/Apache2/compat.pm?view=diff&r1=156220&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/Apache2/compat.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/Apache2/compat.pm Mon Mar 7 15:51:14 2005
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-package Apache::compat;
+package Apache2::compat;
use strict;
use warnings FATAL => 'all';
@@ -24,30 +24,30 @@
#there's enough here to get simple registry scripts working
#add to startup.pl:
-#use Apache::compat ();
-#use lib ...; #or something to find 1.xx Apache::Registry
+#use Apache2::compat ();
+#use lib ...; #or something to find 1.xx Apache2::Registry
#Alias /perl /path/to/perl/scripts
#<Location /perl>
# Options +ExecCGI
# SetHandler modperl
-# PerlResponseHandler Apache::Registry
+# PerlResponseHandler Apache2::Registry
#</Location>
-use Apache::Connection ();
-use Apache::ServerRec ();
-use Apache::ServerUtil ();
-use Apache::Access ();
-use Apache::Module ();
-use Apache::RequestRec ();
-use Apache::RequestIO ();
-use Apache::RequestUtil ();
-use Apache::Response ();
-use Apache::SubRequest ();
-use Apache::Filter ();
-use Apache::Util ();
-use Apache::Log ();
-use Apache::URI ();
+use Apache2::Connection ();
+use Apache2::ServerRec ();
+use Apache2::ServerUtil ();
+use Apache2::Access ();
+use Apache2::Module ();
+use Apache2::RequestRec ();
+use Apache2::RequestIO ();
+use Apache2::RequestUtil ();
+use Apache2::Response ();
+use Apache2::SubRequest ();
+use Apache2::Filter ();
+use Apache2::Util ();
+use Apache2::Log ();
+use Apache2::URI ();
use APR::Date ();
use APR::Table ();
use APR::Pool ();
@@ -55,7 +55,7 @@
use APR::Util ();
use APR::Brigade ();
use APR::Bucket ();
-use mod_perl ();
+use mod_perl2 ();
use Symbol ();
use File::Spec ();
@@ -72,19 +72,19 @@
$INC{'Apache/Table.pm'} = __FILE__;
}
-($Apache::Server::Starting, $Apache::Server::ReStarting) =
- Apache::ServerUtil::restart_count() == 1 ? (1, 0) : (0, 1);
+($Apache2::Server::Starting, $Apache2::Server::ReStarting) =
+ Apache2::ServerUtil::restart_count() == 1 ? (1, 0) : (0, 1);
# api => "overriding code"
# the overriding code, needs to "return" the original CODE reference
# when eval'ed , so that it can be restored later
my %overridable_mp2_api = (
- 'Apache::RequestRec::filename' => <<'EOI',
+ 'Apache2::RequestRec::filename' => <<'EOI',
{
- require Apache::RequestRec;
+ require Apache2::RequestRec;
require APR::Finfo;
- my $orig_sub = *Apache::RequestRec::filename{CODE};
- *Apache::RequestRec::filename = sub {
+ my $orig_sub = *Apache2::RequestRec::filename{CODE};
+ *Apache2::RequestRec::filename = sub {
my($r, $newfile) = @_;
my $old_filename;
if (defined $newfile) {
@@ -101,11 +101,11 @@
}
EOI
- 'Apache::RequestRec::notes' => <<'EOI',
+ 'Apache2::RequestRec::notes' => <<'EOI',
{
- require Apache::RequestRec;
- my $orig_sub = *Apache::RequestRec::notes{CODE};
- *Apache::RequestRec::notes = sub {
+ require Apache2::RequestRec;
+ my $orig_sub = *Apache2::RequestRec::notes{CODE};
+ *Apache2::RequestRec::notes = sub {
my $r = shift;
return wantarray()
? ($r->table_get_set(scalar($r->$orig_sub), @_))
@@ -115,11 +115,11 @@
}
EOI
- 'Apache::RequestRec::finfo' => <<'EOI',
+ 'Apache2::RequestRec::finfo' => <<'EOI',
{
require APR::Finfo;
my $orig_sub = *APR::Finfo::finfo{CODE};
- sub Apache::RequestRec::finfo {
+ sub Apache2::RequestRec::finfo {
my $r = shift;
stat $r->filename;
\*_;
@@ -128,13 +128,13 @@
}
EOI
- 'Apache::Connection::local_addr' => <<'EOI',
+ 'Apache2::Connection::local_addr' => <<'EOI',
{
- require Apache::Connection;
+ require Apache2::Connection;
require Socket;
require APR::SockAddr;
- my $orig_sub = *Apache::Connection::local_addr{CODE};
- *Apache::Connection::local_addr = sub {
+ my $orig_sub = *Apache2::Connection::local_addr{CODE};
+ *Apache2::Connection::local_addr = sub {
my $c = shift;
Socket::pack_sockaddr_in($c->$orig_sub->port,
Socket::inet_aton($c->$orig_sub->ip_get));
@@ -143,13 +143,13 @@
}
EOI
- 'Apache::Connection::remote_addr' => <<'EOI',
+ 'Apache2::Connection::remote_addr' => <<'EOI',
{
- require Apache::Connection;
+ require Apache2::Connection;
require APR::SockAddr;
require Socket;
- my $orig_sub = *Apache::Connection::remote_addr{CODE};
- *Apache::Connection::remote_addr = sub {
+ my $orig_sub = *Apache2::Connection::remote_addr{CODE};
+ *Apache2::Connection::remote_addr = sub {
my $c = shift;
if (@_) {
my $addr_in = shift;
@@ -166,11 +166,11 @@
}
EOI
- 'Apache::Module::top_module' => <<'EOI',
+ 'Apache2::Module::top_module' => <<'EOI',
{
- require Apache::Module;
- my $orig_sub = *Apache::Module::top_module{CODE};
- *Apache::Module::top_module = sub {
+ require Apache2::Module;
+ my $orig_sub = *Apache2::Module::top_module{CODE};
+ *Apache2::Module::top_module = sub {
shift;
$orig_sub->(@_);
};
@@ -178,11 +178,11 @@
}
EOI
- 'Apache::Module::get_config' => <<'EOI',
+ 'Apache2::Module::get_config' => <<'EOI',
{
- require Apache::Module;
- my $orig_sub = *Apache::Module::get_config{CODE};
- *Apache::Module::get_config = sub {
+ require Apache2::Module;
+ my $orig_sub = *Apache2::Module::get_config{CODE};
+ *Apache2::Module::get_config = sub {
shift;
$orig_sub->(@_);
};
@@ -210,12 +210,12 @@
}
EOI
- 'Apache::Util::ht_time' => <<'EOI',
+ 'Apache2::Util::ht_time' => <<'EOI',
{
- require Apache::Util;
- my $orig_sub = *Apache::Util::ht_time{CODE};
- *Apache::Util::ht_time = sub {
- my $r = Apache::compat::request('Apache::Util::ht_time');
+ require Apache2::Util;
+ my $orig_sub = *Apache2::Util::ht_time{CODE};
+ *Apache2::Util::ht_time = sub {
+ my $r = Apache2::compat::request('Apache2::Util::ht_time');
return $orig_sub->($r->pool, @_);
};
$orig_sub;
@@ -232,7 +232,7 @@
# avoided if possible.
#
# it expects a list of fully qualified functions, like
-# "Apache::RequestRec::finfo"
+# "Apache2::RequestRec::finfo"
sub override_mp2_api {
my (@subs) = @_;
@@ -281,7 +281,7 @@
sub request {
my $what = shift;
- my $r = Apache->request;
+ my $r = Apache2->request;
unless ($r) {
die "cannot use $what ",
@@ -293,29 +293,29 @@
}
{
- my $orig_sub = *Apache::Module::top_module{CODE};
- *Apache::Module::top_module = sub {
+ my $orig_sub = *Apache2::Module::top_module{CODE};
+ *Apache2::Module::top_module = sub {
$orig_sub->();
};
}
{
- my $orig_sub = *Apache::Module::get_config{CODE};
- *Apache::Module::get_config = sub {
- shift if $_[0] eq 'Apache::Module';
+ my $orig_sub = *Apache2::Module::get_config{CODE};
+ *Apache2::Module::get_config = sub {
+ shift if $_[0] eq 'Apache2::Module';
$orig_sub->(@_);
};
}
-package Apache::Server;
+package Apache2::Server;
# XXX: is that good enough? see modperl/src/modules/perl/mod_perl.c:367
-our $CWD = Apache::ServerUtil::server_root;
+our $CWD = Apache2::ServerUtil::server_root;
our $AddPerlVersion = 1;
sub warn {
- shift if @_ and $_[0] eq 'Apache::Server';
- Apache::ServerRec::warn(@_);
+ shift if @_ and $_[0] eq 'Apache2::Server';
+ Apache2::ServerRec::warn(@_);
}
package Apache;
@@ -326,7 +326,7 @@
return File::Spec->catfile(@_);
}
else {
- File::Spec->catfile(Apache::ServerUtil::server_root, @_);
+ File::Spec->catfile(Apache2::ServerUtil::server_root, @_);
}
}
@@ -357,9 +357,9 @@
}
sub module {
- require Apache::Module;
- die 'Usage: Apache->module($name)' if @_ != 2;
- return Apache::Module::loaded($_[1]);
+ require Apache2::Module;
+ die 'Usage: Apache2->module($name)' if @_ != 2;
+ return Apache2::Module::loaded($_[1]);
}
sub gensym {
@@ -368,23 +368,23 @@
sub define {
shift if @_ == 2;
- Apache::ServerUtil::exists_config_define(@_);
+ Apache2::ServerUtil::exists_config_define(@_);
}
sub log_error {
- Apache->server->log_error(@_);
+ Apache2->server->log_error(@_);
}
sub warn {
shift if @_ and $_[0] eq 'Apache';
- Apache::ServerRec::warn(@_);
+ Apache2::ServerRec::warn(@_);
}
sub httpd_conf {
shift;
my $obj;
- eval { $obj = Apache->request };
- $obj = Apache->server if $@;
+ eval { $obj = Apache2->request };
+ $obj = Apache2->server if $@;
my $err = $obj->add_config([split /\n/, join '', @_]);
die $err if $err;
}
@@ -394,22 +394,22 @@
sub push_handlers {
shift;
- Apache->server->push_handlers(@_);
+ Apache2->server->push_handlers(@_);
}
sub set_handlers {
shift;
- Apache->server->set_handlers(@_);
+ Apache2->server->set_handlers(@_);
}
sub get_handlers {
shift;
- Apache->server->get_handlers(@_);
+ Apache2->server->get_handlers(@_);
}
-package Apache::Constants;
+package Apache2::Constants;
-use Apache::Const ();
+use Apache2::Const ();
sub import {
my $class = shift;
@@ -421,17 +421,17 @@
# but simple and close enough for the majority
my %args = map { s/^:response$/:common/; $_ => 1 } @args;
- Apache::Const->compile($package => keys %args);
+ Apache2::Const->compile($package => keys %args);
}
#no need to support in 2.0
sub export {}
-sub SERVER_VERSION { Apache::ServerUtil::get_server_version() }
+sub SERVER_VERSION { Apache2::ServerUtil::get_server_version() }
-package Apache::RequestRec;
+package Apache2::RequestRec;
-use Apache::Const -compile => qw(REMOTE_NAME);
+use Apache2::Const -compile => qw(REMOTE_NAME);
#no longer exist in 2.0
sub soft_timeout {}
@@ -439,7 +439,7 @@
sub kill_timeout {}
sub reset_timeout {}
-# this function is from mp1's Apache::SubProcess 3rd party module
+# this function is from mp1's Apache2::SubProcess 3rd party module
# which is now a part of mp2 API. this function doesn't exist in 2.0.
sub cleanup_for_exec {}
@@ -459,9 +459,9 @@
$r->content_type($type);
}
-#we support Apache->request; this is needed to support $r->request
+#we support Apache2->request; this is needed to support $r->request
#XXX: seems sorta backwards
-*request = \&Apache::request;
+*request = \&Apache2::request;
sub table_get_set {
my($r, $table) = (shift, shift);
@@ -523,7 +523,7 @@
sub get_remote_host {
my($r, $type) = @_;
- $type = Apache::REMOTE_NAME unless defined $type;
+ $type = Apache2::REMOTE_NAME unless defined $type;
$r->connection->get_remote_host($type, $r->per_dir_config);
}
@@ -538,24 +538,24 @@
} split /[=&;]/, $string, -1;
}
-sub Apache::unescape_url_info {
+sub Apache2::unescape_url_info {
my($class, $string) = @_;
- Apache::URI::unescape_url($string);
+ Apache2::URI::unescape_url($string);
$string =~ tr/+/ /;
$string;
}
-#sorry, have to use $r->Apache::args at the moment
+#sorry, have to use $r->Apache2::args at the moment
#for list context splitting
-sub Apache::args {
+sub Apache2::args {
my $r = shift;
my $args = $r->args;
return $args unless wantarray;
return $r->parse_args($args);
}
-use Apache::Const -compile => qw(MODE_READBYTES);
+use Apache2::Const -compile => qw(MODE_READBYTES);
use APR::Const -compile => qw(SUCCESS BLOCK_READ);
use constant IOBUFSIZE => 8192;
@@ -569,7 +569,7 @@
my $data = '';
my $seen_eos = 0;
do {
- $r->input_filters->get_brigade($bb, Apache::MODE_READBYTES,
+ $r->input_filters->get_brigade($bb, Apache2::MODE_READBYTES,
APR::BLOCK_READ, IOBUFSIZE);
while (!$bb->is_empty) {
my $b = $bb->first;
@@ -595,13 +595,13 @@
sub server_root_relative {
my $r = shift;
- File::Spec->catfile(Apache::ServerUtil::server_root, @_);
+ File::Spec->catfile(Apache2::ServerUtil::server_root, @_);
}
sub clear_rgy_endav {
my($r, $script_name) = @_;
require ModPerl::Global;
- my $package = 'Apache::ROOT' . $script_name;
+ my $package = 'Apache2::ROOT' . $script_name;
ModPerl::Global::special_list_clear(END => $package);
}
@@ -610,14 +610,14 @@
}
#if somebody really wants to have END subroutine support
-#with the 1.x Apache::Registry they will need to configure:
-# PerlHandler Apache::Registry Apache::compat::run_rgy_endav
-sub Apache::compat::run_rgy_endav {
+#with the 1.x Apache2::Registry they will need to configure:
+# PerlHandler Apache2::Registry Apache2::compat::run_rgy_endav
+sub Apache2::compat::run_rgy_endav {
my $r = shift;
require ModPerl::Global;
- require Apache::PerlRun; #1.x's
- my $package = Apache::PerlRun->new($r)->namespace;
+ require Apache2::PerlRun; #1.x's
+ my $package = Apache2::PerlRun->new($r)->namespace;
ModPerl::Global::special_list_call(END => $package);
}
@@ -678,9 +678,9 @@
sub is_main { !shift->main }
# really old back-compat methods, they shouldn't be used in mp1
-*cgi_var = *cgi_env = \&Apache::RequestRec::subprocess_env;
+*cgi_var = *cgi_env = \&Apache2::RequestRec::subprocess_env;
-package Apache::File;
+package Apache2::File;
use Fcntl ();
use Symbol ();
@@ -701,7 +701,7 @@
sub open {
my($self) = shift;
- Carp::croak("no Apache::File object passed")
+ Carp::croak("no Apache2::File object passed")
unless $self && ref($self);
# cannot forward @_ to open() because of its prototype
@@ -729,7 +729,7 @@
sub tmpfile {
my $class = shift;
my $limit = 100;
- my $r = Apache::compat::request('Apache::File->tmpfile');
+ my $r = Apache2::compat::request('Apache2::File->tmpfile');
while ($limit--) {
my $tmpfile = "$TMPDIR/${$}" . $TMPNAM++;
@@ -745,20 +745,20 @@
}
}
-# the following functions now live in Apache::RequestIO
+# the following functions now live in Apache2::RequestIO
# * discard_request_body
-# the following functions now live in Apache::Response
+# the following functions now live in Apache2::Response
# * meets_conditions
# * set_content_length
# * set_etag
# * set_last_modified
# * update_mtime
-# the following functions now live in Apache::RequestRec
+# the following functions now live in Apache2::RequestRec
# * mtime
-package Apache::Util;
+package Apache2::Util;
sub size_string {
my($size) = @_;
@@ -785,12 +785,12 @@
return $size;
}
-*unescape_uri = \&Apache::URI::unescape_url;
+*unescape_uri = \&Apache2::URI::unescape_url;
sub escape_uri {
my $path = shift;
- my $r = Apache::compat::request('Apache::Util::escape_uri');
- Apache::Util::escape_path($path, $r->pool);
+ my $r = Apache2::compat::request('Apache2::Util::escape_uri');
+ Apache2::Util::escape_path($path, $r->pool);
}
#tmp compat until ap_escape_html is reworked to not require a pool
@@ -815,7 +815,7 @@
*validate_password = \&APR::Util::password_validate;
-sub Apache::URI::parse {
+sub Apache2::URI::parse {
my($class, $r, $uri) = @_;
$uri ||= $r->construct_url;
@@ -823,7 +823,7 @@
APR::URI->parse($r->pool, $uri);
}
-package Apache::Table;
+package Apache2::Table;
sub new {
my($class, $r, $nelts) = @_;
@@ -831,21 +831,21 @@
APR::Table::make($r->pool, $nelts);
}
-package Apache::SIG;
+package Apache2::SIG;
-use Apache::Const -compile => 'DECLINED';
+use Apache2::Const -compile => 'DECLINED';
sub handler {
# don't set the SIGPIPE
- return Apache::DECLINED;
+ return Apache2::DECLINED;
}
-package Apache::Connection;
+package Apache2::Connection;
# auth_type and user records don't exist in 2.0 conn_rec struct
# 'PerlOptions +GlobalRequest' is required
-sub auth_type { shift; Apache->request->ap_auth_type(@_) }
-sub user { shift; Apache->request->user(@_) }
+sub auth_type { shift; Apache2->request->ap_auth_type(@_) }
+sub user { shift; Apache2->request->user(@_) }
1;
__END__
Modified: perl/modperl/branches/apache2-rename-unstable/lib/Apache2/porting.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/Apache2/porting.pm?view=diff&r1=156220&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/Apache2/porting.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/Apache2/porting.pm Mon Mar 7 15:51:14 2005
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-package Apache::porting;
+package Apache2::porting;
use strict;
use warnings FATAL => 'all';
@@ -20,9 +20,9 @@
use Carp 'croak';
use ModPerl::MethodLookup ();
-use Apache::ServerUtil;
+use Apache2::ServerUtil;
-use Apache::Const -compile => 'OK';
+use Apache2::Const -compile => 'OK';
our $AUTOLOAD;
@@ -38,14 +38,14 @@
# XXX: unfortunately it doesn't seem to be possible to install
# *UNIVERSAL::AUTOLOAD at the server startup, httpd segfaults,
# child_init seems to be the first stage where it works.
-Apache->server->push_handlers(PerlChildInitHandler => \&porting_autoload);
+Apache2->server->push_handlers(PerlChildInitHandler => \&porting_autoload);
sub porting_autoload {
*UNIVERSAL::AUTOLOAD = sub {
# This is a porting module, no compatibility layers are allowed in
# this zone
- croak("Apache::porting can't be used with Apache::compat")
- if exists $ENV{"Apache/compat.pm"};
+ croak("Apache2::porting can't be used with Apache2::compat")
+ if exists $ENV{"Apache2/compat.pm"};
(my $method = $AUTOLOAD) =~ s/.*:://;
@@ -62,7 +62,7 @@
croak $hint;
};
- return Apache::OK;
+ return Apache2::OK;
}
### packages ###
@@ -70,10 +70,10 @@
# - removed and replaced packages
my %packages = (
- 'Apache::Constants' => [qw(Apache::Const)],
- 'Apache::Table' => [qw(APR::Table)],
- 'Apache::File' => [qw(Apache::Response Apache::RequestRec)],
- 'Apache' => [qw(ModPerl::Util Apache::Module)],
+ 'Apache2::Constants' => [qw(Apache2::Const)],
+ 'Apache2::Table' => [qw(APR::Table)],
+ 'Apache2::File' => [qw(Apache2::Response Apache2::RequestRec)],
+ 'Apache' => [qw(ModPerl::Util Apache2::Module)],
);
BEGIN {
Modified: perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildMM.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildMM.pm?view=diff&r1=156465&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildMM.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildMM.pm Mon Mar 7 15:51:14 2005
@@ -23,7 +23,7 @@
use File::Basename;
use File::Find;
-use Apache::Build ();
+use Apache2::Build ();
use ModPerl::MM;
our %PM; #add files to installation
@@ -48,7 +48,7 @@
sub build_config {
my $key = shift;
- $build ||= Apache::Build->build_config;
+ $build ||= Apache2::Build->build_config;
return $build unless $key;
$build->{$key};
}
@@ -82,7 +82,7 @@
my $libs;
my @libs = ();
- if (Apache::Build::BUILD_APREXT) {
+ if (Apache2::Build::BUILD_APREXT) {
# in order to decouple APR/APR::* from mod_perl.so,
# link these modules against the static MP_APR_LIB lib,
# rather than the mod_perl lib (which would demand mod_perl.so
@@ -131,7 +131,7 @@
}
my %always_dynamic = map { $_, 1 }
- qw(ModPerl::Const Apache::Const APR::Const APR APR::PerlIO);
+ qw(ModPerl::Const Apache2::Const APR::Const APR APR::PerlIO);
sub ModPerl::BuildMM::MY::constants {
my $self = shift;
@@ -312,10 +312,10 @@
}
}
- # prefix typemap with Apache/ so when installed in the
+ # prefix typemap with Apache2/ so when installed in the
# perl-lib-tree it won't be picked by non-mod_perl modules
if (exists $pm->{'lib/typemap'} ) {
- $pm->{'lib/typemap'} = '$(INST_ARCHLIB)/auto/Apache/typemap';
+ $pm->{'lib/typemap'} = '$(INST_ARCHLIB)/auto/Apache2/typemap';
}
#not everything in MakeMaker uses INST_LIB
Modified: perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildOptions.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildOptions.pm?view=diff&r1=156465&r2=156466
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildOptions.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildOptions.pm Mon Mar 7 15:51:14 2005
@@ -17,7 +17,7 @@
use strict;
use warnings;
-use Apache::Build ();
+use Apache2::Build ();
use Apache::TestTrace;
my $param_qr = qr([\s=]+);
@@ -116,7 +116,7 @@
if ($key eq 'MP_AP_PREFIX') {
$val = File::Spec->canonpath(File::Spec->rel2abs($val));
- if (Apache::Build::WIN32()) {
+ if (Apache2::Build::WIN32()) {
# MP_AP_PREFIX may not contain spaces
require Win32;
$val = Win32::GetShortPathName($val);
@@ -228,7 +228,7 @@
INST_APACHE2 0 Install *.pm relative to Apache2/ directory
PROMPT_DEFAULT 0 Accept default value for all would-be prompts
OPTIONS_FILE 0 Read options from given file
-STATIC_EXTS 0 Build Apache::*.xs as static extensions
+STATIC_EXTS 0 Build Apache2::*.xs as static extensions
APXS 0 Path to apxs
AP_DESTDIR 0 Destination for Apache specific mod_perl bits
AP_PREFIX 0 Apache installation or source tree prefix