perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From go...@apache.org
Subject svn commit: r345426 - in /perl/modperl/trunk: Changes lib/Apache2/PerlSections.pm src/modules/perl/modperl_cmd.c t/conf/extra.last.conf.in t/hooks/TestHooks/push_handlers_anon.pm
Date Fri, 18 Nov 2005 03:27:31 GMT
Author: gozer
Date: Thu Nov 17 19:27:28 2005
New Revision: 345426

URL: http://svn.apache.org/viewcvs?rev=345426&view=rev
Log:
Backed out my previous change to Apache::ServerUtil->server in
favor of a new method Apache2::PerlSections->server


Modified:
    perl/modperl/trunk/Changes
    perl/modperl/trunk/lib/Apache2/PerlSections.pm
    perl/modperl/trunk/src/modules/perl/modperl_cmd.c
    perl/modperl/trunk/t/conf/extra.last.conf.in
    perl/modperl/trunk/t/hooks/TestHooks/push_handlers_anon.pm

Modified: perl/modperl/trunk/Changes
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/Changes?rev=345426&r1=345425&r2=345426&view=diff
==============================================================================
--- perl/modperl/trunk/Changes (original)
+++ perl/modperl/trunk/Changes Thu Nov 17 19:27:28 2005
@@ -12,9 +12,8 @@
 
 =item 2.0.3-dev
 
-Calling Apache2::ServerUtil->server in <Perl> sections now
-returns the server into which the <Perl> section was defined
-[Gozer]
+Added Apache2::PerlSections->server, returning the server
+into which the <Perl> section is defined [Gozer]
 
 Require B::Size and B::TerseSize v0.06 for Apache2::Status
 options StatusTerse and StatusTerseSize which has now been 

Modified: perl/modperl/trunk/lib/Apache2/PerlSections.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/lib/Apache2/PerlSections.pm?rev=345426&r1=345425&r2=345426&view=diff
==============================================================================
--- perl/modperl/trunk/lib/Apache2/PerlSections.pm (original)
+++ perl/modperl/trunk/lib/Apache2/PerlSections.pm Thu Nov 17 19:27:28 2005
@@ -40,6 +40,7 @@
 
 my @saved;
 sub save       { return $Apache2::PerlSections::Save }
+sub server     { return $Apache2::PerlSections::Server }
 sub saved      { return @saved }
 
 sub handler : method {

Modified: perl/modperl/trunk/src/modules/perl/modperl_cmd.c
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/src/modules/perl/modperl_cmd.c?rev=345426&r1=345425&r2=345426&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_cmd.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_cmd.c Thu Nov 17 19:27:28 2005
@@ -485,6 +485,8 @@
 #define MP_DEFAULT_PERLSECTION_PACKAGE "Apache2::ReadConfig"
 #define MP_PERLSECTIONS_SAVECONFIG_SV \
     get_sv("Apache2::PerlSections::Save", FALSE)
+#define MP_PERLSECTIONS_SERVER_SV \
+    get_sv("Apache2::PerlSections::Server", TRUE)
 
 MP_CMD_SRV_DECLARE(perldo)
 {
@@ -550,7 +552,7 @@
     }
 
     {
-        server_rec *old_s = modperl_global_get_server_rec();
+        SV *server = MP_PERLSECTIONS_SERVER_SV;
         SV *code = newSVpv(arg, 0);
         GV *gv = gv_fetchpv("0", TRUE, SVt_PV);
         ENTER;SAVETMPS;
@@ -558,11 +560,10 @@
 #if PERL_REVISION == 5 && PERL_VERSION >= 9
         TAINT_NOT; /* XXX: temp workaround, see my p5p post */
 #endif
-        modperl_global_set_server_rec(s);
+        sv_setref_pv(server, "Apache2::ServerRec", (void*)s);
         sv_setpv_mg(GvSV(gv), directive->filename);
         eval_sv(code, G_SCALAR|G_KEEPERR);
         SvREFCNT_dec(code);
-        modperl_global_set_server_rec(old_s);
         modperl_env_sync_srv_env_hash2table(aTHX_ p, scfg);
         modperl_env_sync_dir_env_hash2table(aTHX_ p, dcfg);
         FREETMPS;LEAVE;

Modified: perl/modperl/trunk/t/conf/extra.last.conf.in
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/conf/extra.last.conf.in?rev=345426&r1=345425&r2=345426&view=diff
==============================================================================
--- perl/modperl/trunk/t/conf/extra.last.conf.in (original)
+++ perl/modperl/trunk/t/conf/extra.last.conf.in Thu Nov 17 19:27:28 2005
@@ -64,12 +64,12 @@
 </Perl>
 
 <Perl >
-$TestDirective::perl::base_server = Apache2::ServerUtil->server;
+$TestDirective::perl::base_server = Apache2::PerlSections->server;
 </Perl>
 
 <VirtualHost perlsections>
   <Perl >
-    $TestDirective::perl::vhost_server = Apache2::ServerUtil->server;
+    $TestDirective::perl::vhost_server = Apache2::PerlSections->server;
   </Perl>
 </VirtualHost>
 

Modified: perl/modperl/trunk/t/hooks/TestHooks/push_handlers_anon.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/hooks/TestHooks/push_handlers_anon.pm?rev=345426&r1=345425&r2=345426&view=diff
==============================================================================
--- perl/modperl/trunk/t/hooks/TestHooks/push_handlers_anon.pm (original)
+++ perl/modperl/trunk/t/hooks/TestHooks/push_handlers_anon.pm Thu Nov 17 19:27:28 2005
@@ -44,7 +44,7 @@
 <VirtualHost TestHooks::push_handlers_anon>
     PerlModule            TestHooks::push_handlers_anon
     <Perl >
-    my $s = Apache2::ServerUtil->server;
+    my $s = Apache2::PerlSections->server;
 
     $s->push_handlers(PerlFixupHandler => 
                        sub { &TestHooks::push_handlers_anon::add_note });



Mime
View raw message