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 do...@apache.org on 2002/05/22 20:53:33 UTC
cvs commit: modperl-2.0/t/response/TestModules cgi.pm
dougm 02/05/22 11:53:33
Modified: src/modules/perl mod_perl.c modperl_global.c
t/response/TestAPI r_subclass.pm
t/response/TestModules cgi.pm
Log:
turn on PerlOptions +GlobalRequest by default for perl-script handler
unless it is explicitly turned off with PerlOptions -GlobalRequest
Revision Changes Path
1.115 +5 -0 modperl-2.0/src/modules/perl/mod_perl.c
Index: mod_perl.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- mod_perl.c 12 May 2002 18:53:23 -0000 1.114
+++ mod_perl.c 22 May 2002 18:53:33 -0000 1.115
@@ -696,6 +696,11 @@
modperl_env_request_populate(aTHX_ r);
}
+ /* default is +GlobalRequest, skip if PerlOption -GlobalRequest */
+ if (MpDirGLOBAL_REQUEST(dcfg) || !MpDirSeenGLOBAL_REQUEST(dcfg)) {
+ modperl_global_request_set(r);
+ }
+
h_stdout = modperl_io_tie_stdout(aTHX_ r);
h_stdin = modperl_io_tie_stdin(aTHX_ r);
1.6 +0 -1 modperl-2.0/src/modules/perl/modperl_global.c
Index: modperl_global.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_global.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- modperl_global.c 9 Apr 2002 01:00:52 -0000 1.5
+++ modperl_global.c 22 May 2002 18:53:33 -0000 1.6
@@ -8,7 +8,6 @@
/* only if PerlOptions +GlobalRequest and not done already */
if (MpDirGLOBAL_REQUEST(dcfg) && !MpReqSET_GLOBAL_REQUEST(rcfg)) {
modperl_global_request_set(r);
- MpReqSET_GLOBAL_REQUEST_On(rcfg);
}
}
1.3 +6 -1 modperl-2.0/t/response/TestAPI/r_subclass.pm
Index: r_subclass.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/r_subclass.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- r_subclass.pm 11 Apr 2002 11:08:43 -0000 1.2
+++ r_subclass.pm 22 May 2002 18:53:33 -0000 1.3
@@ -21,7 +21,9 @@
sub handler {
my $r = __PACKAGE__->new(shift);
- plan $r, tests => 4;
+ plan $r, tests => 5;
+
+ ok ! Apache->request;
ok $r->uri eq $location;
@@ -39,3 +41,6 @@
}
1;
+__END__
+SetHandler perl-script
+PerlOptions -GlobalRequest
1.11 +1 -1 modperl-2.0/t/response/TestModules/cgi.pm
Index: cgi.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestModules/cgi.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- cgi.pm 11 Apr 2002 11:08:45 -0000 1.10
+++ cgi.pm 22 May 2002 18:53:33 -0000 1.11
@@ -55,4 +55,4 @@
1;
__END__
SetHandler perl-script
-PerlOptions +GlobalRequest
+