Author: geoff Date: Thu Apr 7 07:54:05 2005 New Revision: 160405 URL: http://svn.apache.org/viewcvs?view=rev&rev=160405 Log: rename Apache2->server() to Apache2::ServerUtil->server()
Modified: perl/modperl/trunk/Changes perl/modperl/trunk/ModPerl-Registry/t/conf/modperl_extra_startup.pl perl/modperl/trunk/lib/Apache2/compat.pm perl/modperl/trunk/t/apache/add_config.t perl/modperl/trunk/t/conf/modperl_extra.pl perl/modperl/trunk/t/conf/post_config_startup.pl perl/modperl/trunk/t/htdocs/vhost/startup.pl perl/modperl/trunk/t/lib/TestExit/FromPerlModule.pm perl/modperl/trunk/t/response/TestAPI/server_util.pm perl/modperl/trunk/t/response/TestCompat/apache.pm perl/modperl/trunk/t/response/TestDirective/perlloadmodule3.pm perl/modperl/trunk/t/response/TestModperl/dir_config.pm perl/modperl/trunk/t/vhost/config.t perl/modperl/trunk/xs/Apache2/ServerUtil/Apache2__ServerUtil.h perl/modperl/trunk/xs/maps/modperl_functions.map Modified: perl/modperl/trunk/Changes URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/Changes?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/Changes (original) +++ perl/modperl/trunk/Changes Thu Apr 7 07:54:05 2005 @@ -33,12 +33,14 @@ add $ENV{MOD_PERL_API_VERSION} as something that clearly distinguishes which mod_perl version is being used at request time. [Geoffrey Young] -Make sure that CPAN shell doesn't triple over usage of -$ExtUtils::MakeMaker::VERSION [Randy Kobes] -rename Apache->request() to Apache2::RequestUtil->request() +rename Apache->request() to Apache2::RequestUtil->request(), and +Apache->server() to Apache2::ServerUtil->server() [Geoffrey Young] +Make sure that CPAN shell doesn't triple over usage of +$ExtUtils::MakeMaker::VERSION [Randy Kobes] + make sure not to use apr_os_thread_current in debug mode when libapr wasn't built with threads support [Stas] @@ -47,7 +49,7 @@ remove CGI.pm and Apache::Request dependencies from Apache2::Status since they weren't used at all [Geoffrey Young] -Fixes for Apache::Reload's touchfile feature (return Apache::OK +Fixes for Apache2::Reload's touchfile feature (return Apache2::Const::OK instead of 1) [Chris Warren <[EMAIL PROTECTED]>] cygwin fixes: [Nick *** <[EMAIL PROTECTED]>] @@ -78,7 +80,7 @@ replaced the -r check with a proper error handling when the file is read in. [Damon Buckwalter <[EMAIL PROTECTED]>] -Apache::RequestUtil::slurp_filename now throws an APR::Error exception +Apache2::RequestUtil::slurp_filename now throws an APR::Error exception object (before it was just croaking). [Stas] fix APR::Error's overload of '==' (it was always returning true @@ -87,7 +89,7 @@ if $r->document_root was modified, restore it at the end of request [joes] -Apache::ServerRec method which set the non-integer fields in the +Apache2::ServerRec method which set the non-integer fields in the server_rec, now copy the value from the perl scalar, so if it changes or goes out of scope the C struct is not affected. Using internal perl variables to preserve the value, since using the server pool to @@ -96,7 +98,7 @@ add the escape_url entry in the ModPerl::MethodLookup knowledgebase [Stas] -Apache::SubProcess::spawn_proc_prog now can be called in a void +Apache2::SubProcess::spawn_proc_prog now can be called in a void context, in which case all the communication std pipes will be closed [Stas] @@ -122,7 +124,7 @@ Perl -Duse64bit fix. apr_size_t pointers can't just be generically casted from/to UVs. Use PTR2UV/INT2PTR instead. [Gozer] -fix a bug in Apache::Build::dir: If the right directory isn't found in +fix a bug in Apache2::Build::dir: If the right directory isn't found in the for loop $dir still contains a > value, so the ||= has no effect. [Nick Wellnhofer <[EMAIL PROTECTED]>] Modified: perl/modperl/trunk/ModPerl-Registry/t/conf/modperl_extra_startup.pl URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/ModPerl-Registry/t/conf/modperl_extra_startup.pl?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/ModPerl-Registry/t/conf/modperl_extra_startup.pl (original) +++ perl/modperl/trunk/ModPerl-Registry/t/conf/modperl_extra_startup.pl Thu Apr 7 07:54:05 2005 @@ -9,7 +9,7 @@ use DirHandle (); -my $proc = Apache2->server->process; +my $proc = Apache2::ServerUtil->server->process; my $pool = $proc->pool; # can't use catfile with server_root as it contains unix dir Modified: perl/modperl/trunk/lib/Apache2/compat.pm URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/lib/Apache2/compat.pm?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/lib/Apache2/compat.pm (original) +++ perl/modperl/trunk/lib/Apache2/compat.pm Thu Apr 7 07:54:05 2005 @@ -389,7 +389,7 @@ } sub log_error { - Apache2->server->log_error(@_); + Apache2::ServerUtil->server->log_error(@_); } sub warn { @@ -401,7 +401,7 @@ shift; my $obj; eval { $obj = Apache2::RequestUtil->request }; - $obj = Apache2->server if $@; + $obj = Apache2::ServerUtil->server if $@; my $err = $obj->add_config([split /\n/, join '', @_]); die $err if $err; } @@ -411,17 +411,17 @@ sub push_handlers { shift; - Apache2->server->push_handlers(@_); + Apache2::ServerUtil->server->push_handlers(@_); } sub set_handlers { shift; - Apache2->server->set_handlers(@_); + Apache2::ServerUtil->server->set_handlers(@_); } sub get_handlers { shift; - Apache2->server->get_handlers(@_); + Apache2::ServerUtil->server->get_handlers(@_); } package Apache::Constants; Modified: perl/modperl/trunk/t/apache/add_config.t URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/apache/add_config.t?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/t/apache/add_config.t (original) +++ perl/modperl/trunk/t/apache/add_config.t Thu Apr 7 07:54:05 2005 @@ -1,5 +1,5 @@ # the handler is configured in modperl_extra.pl via -# Apache2->server->add_config +# Apache2::ServerUtil->server->add_config use Apache::TestRequest 'GET_BODY_ASSERT'; print GET_BODY_ASSERT "/apache/add_config"; Modified: perl/modperl/trunk/t/conf/modperl_extra.pl URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/conf/modperl_extra.pl?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/t/conf/modperl_extra.pl (original) +++ perl/modperl/trunk/t/conf/modperl_extra.pl Thu Apr 7 07:54:05 2005 @@ -53,7 +53,7 @@ # after Apache2 has pushed blib and core dirs including Apache2 on # top reorg @INC to have first devel libs, then blib libs, and # only then perl core libs - my $pool = Apache2->server->process->pool; + my $pool = Apache2::ServerUtil->server->process->pool; my $project_root = canonpath Apache2::ServerUtil::server_root_relative($pool, ".."); my (@a, @b, @c); @@ -79,7 +79,7 @@ Apache2::Log->info("$ap_mods Apache2:: modules loaded"); Apache2::ServerRec->log->info("$apr_mods APR:: modules loaded"); - my $server = Apache2->server; + my $server = Apache2::ServerUtil->server; my $vhosts = 0; for (my $s = $server->next; $s; $s = $s->next) { $vhosts++; @@ -99,16 +99,16 @@ PerlResponseHandler Apache::TestHandler::ok1 </Location> EOC - Apache2->server->add_config([split /\n/, $conf]); + Apache2::ServerUtil->server->add_config([split /\n/, $conf]); # test a directive that triggers an early startup, so we get an # attempt to use perl's mip early - Apache2->server->add_config(['<Perl >', '1;', '</Perl>']); + Apache2::ServerUtil->server->add_config(['<Perl >', '1;', '</Perl>']); } # need to run from config phase, since it registers PerlPostConfigHandler sub test_add_version_component { - Apache2->server->push_handlers( + Apache2::ServerUtil->server->push_handlers( PerlPostConfigHandler => \&add_my_version); sub add_my_version { Modified: perl/modperl/trunk/t/conf/post_config_startup.pl URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/conf/post_config_startup.pl?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/t/conf/post_config_startup.pl (original) +++ perl/modperl/trunk/t/conf/post_config_startup.pl Thu Apr 7 07:54:05 2005 @@ -92,7 +92,7 @@ # can still set it after restart sub test_loglevel { use Apache2::Const -compile => 'LOG_INFO'; - my $s = Apache2->server; + my $s = Apache2::ServerUtil->server; my $oldloglevel = $s->loglevel(Apache2::Const::LOG_INFO); # restore $s->loglevel($oldloglevel); Modified: perl/modperl/trunk/t/htdocs/vhost/startup.pl URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/htdocs/vhost/startup.pl?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/t/htdocs/vhost/startup.pl (original) +++ perl/modperl/trunk/t/htdocs/vhost/startup.pl Thu Apr 7 07:54:05 2005 @@ -9,7 +9,7 @@ # base server # XXX: at the moment this is wrong, since it return the base server $s # and not the vhost's one. needs to be fixed. -my $s = Apache2->server; +my $s = Apache2::ServerUtil->server; my $vhost_doc_root = catdir Apache2::ServerUtil::server_root, qw(htdocs vhost); Modified: perl/modperl/trunk/t/lib/TestExit/FromPerlModule.pm URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/lib/TestExit/FromPerlModule.pm?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/t/lib/TestExit/FromPerlModule.pm (original) +++ perl/modperl/trunk/t/lib/TestExit/FromPerlModule.pm Thu Apr 7 07:54:05 2005 @@ -4,6 +4,7 @@ use warnings FATAL => qw(all); use Apache2::ServerRec; +use Apache2::ServerUtil; use Apache2::Log; use Apache2::Const -compile => qw(OK); @@ -15,6 +16,6 @@ Apache2::Const::OK; } -Apache2->server->push_handlers(PerlChildExitHandler => \&exit_handler); +Apache2::ServerUtil->server->push_handlers(PerlChildExitHandler => \&exit_handler); 1; Modified: perl/modperl/trunk/t/response/TestAPI/server_util.pm URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/response/TestAPI/server_util.pm?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/t/response/TestAPI/server_util.pm (original) +++ perl/modperl/trunk/t/response/TestAPI/server_util.pm Thu Apr 7 07:54:05 2005 @@ -67,12 +67,18 @@ my $r = shift; my %pools = ( - '$r->pool' => $r->pool, - '$r->connection->pool' => $r->connection->pool, - '$r->server->process->pool' => $r->server->process->pool, - '$r->server->process->pconf' => $r->server->process->pconf, - 'Apache2->server->process->pconf' => Apache2->server->process->pconf, - 'APR::Pool->new' => APR::Pool->new, + '$r->pool' => + $r->pool, + '$r->connection->pool' => + $r->connection->pool, + '$r->server->process->pool' => + $r->server->process->pool, + '$r->server->process->pconf' => + $r->server->process->pconf, + 'Apache2::ServerUtil->server->process->pconf' => + Apache2::ServerUtil->server->process->pconf, + 'APR::Pool->new' => + APR::Pool->new, ); # syntax - an object or pool is required Modified: perl/modperl/trunk/t/response/TestCompat/apache.pm URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/response/TestCompat/apache.pm?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/t/response/TestCompat/apache.pm (original) +++ perl/modperl/trunk/t/response/TestCompat/apache.pm Thu Apr 7 07:54:05 2005 @@ -98,11 +98,11 @@ ok t_filepath_cmp(canonpath(Apache->server_root_relative('conf')), catfile($server_root, 'conf'), - "Apache2->server_root_relative('conf')"); + "Apache2::ServerUtil->server_root_relative('conf')"); ok t_filepath_cmp(canonpath(Apache->server_root_relative), canonpath($server_root), - 'Apache2->server_root_relative()'); + 'Apache2::ServerUtil->server_root_relative()'); my $path = catfile(Apache2::ServerUtil::server_root, 'logs'); ok t_filepath_cmp(canonpath(Apache->server_root_relative($path)), Modified: perl/modperl/trunk/t/response/TestDirective/perlloadmodule3.pm URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/response/TestDirective/perlloadmodule3.pm?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/t/response/TestDirective/perlloadmodule3.pm (original) +++ perl/modperl/trunk/t/response/TestDirective/perlloadmodule3.pm Thu Apr 7 07:54:05 2005 @@ -103,7 +103,7 @@ my $srv_cfg = get_config($s); if ($s->is_virtual) { - $secs{"1: Main Server"} = get_config(Apache2->server); + $secs{"1: Main Server"} = get_config(Apache2::ServerUtil->server); $secs{"2: Virtual Host"} = $srv_cfg; $secs{"3: Location"} = $dir_cfg; } Modified: perl/modperl/trunk/t/response/TestModperl/dir_config.pm URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/response/TestModperl/dir_config.pm?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/t/response/TestModperl/dir_config.pm (original) +++ perl/modperl/trunk/t/response/TestModperl/dir_config.pm Thu Apr 7 07:54:05 2005 @@ -137,7 +137,7 @@ { # base server test - my $bs = Apache2->server; + my $bs = Apache2::ServerUtil->server; ok t_cmp(($bs && ref($bs)), 'Apache2::ServerRec', "base server's object retrieval"); Modified: perl/modperl/trunk/t/vhost/config.t URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/vhost/config.t?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/t/vhost/config.t (original) +++ perl/modperl/trunk/t/vhost/config.t Thu Apr 7 07:54:05 2005 @@ -1,5 +1,5 @@ # the handler is configured in modperl_extra.pl via -# Apache2->server->add_config +# Apache2::ServerUtil->server->add_config use Apache::Test; use Apache::TestUtil; Modified: perl/modperl/trunk/xs/Apache2/ServerUtil/Apache2__ServerUtil.h URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/xs/Apache2/ServerUtil/Apache2__ServerUtil.h?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/xs/Apache2/ServerUtil/Apache2__ServerUtil.h (original) +++ perl/modperl/trunk/xs/Apache2/ServerUtil/Apache2__ServerUtil.h Thu Apr 7 07:54:05 2005 @@ -149,7 +149,7 @@ #define mpxs_Apache2__ServerRec_dir_config(s, key, sv_val) \ modperl_dir_config(aTHX_ NULL, s, key, sv_val) -#define mpxs_Apache2_server(classname) modperl_global_get_server_rec() +#define mpxs_Apache2__ServerUtil_server(classname) modperl_global_get_server_rec() static MP_INLINE int mpxs_Apache2__ServerRec_is_perl_option_enabled(pTHX_ server_rec *s, Modified: perl/modperl/trunk/xs/maps/modperl_functions.map URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/xs/maps/modperl_functions.map?view=diff&r1=160404&r2=160405 ============================================================================== --- perl/modperl/trunk/xs/maps/modperl_functions.map (original) +++ perl/modperl/trunk/xs/maps/modperl_functions.map Thu Apr 7 07:54:05 2005 @@ -85,7 +85,7 @@ mpxs_Apache2__ServerUtil_server_shutdown_cleanup_register | | cv, arg=Nullsv int:DEFINE_restart_count -PACKAGE=Apache2 +MODULE=Apache2::ServerUtil PACKAGE=Apache2::ServerUtil server_rec *:DEFINE_server | | SV *:classname=Nullsv MODULE=Apache2::Connection