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...@hyperreal.org on 1998/12/14 21:58:53 UTC
cvs commit: modperl/t/net/perl api.pl
dougm 98/12/14 12:58:52
Modified: . Changes ToDo
lib mod_perl.pm
src/modules/perl mod_perl.c perl_util.c
t/docs startup.pl
t/net/perl api.pl
Log:
$ENV{MOD_PERL} is not inherited by subprocesses
no longer use -e with perl_parse() (under unix)
Revision Changes Path
1.226 +4 -0 modperl/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl/Changes,v
retrieving revision 1.225
retrieving revision 1.226
diff -u -r1.225 -r1.226
--- Changes 1998/12/11 23:03:59 1.225
+++ Changes 1998/12/14 20:58:44 1.226
@@ -8,6 +8,10 @@
=item 1.16_03-dev
+$ENV{MOD_PERL} is not inherited by subprocesses
+
+no longer use -e with perl_parse() (under unix)
+
Apache::ExtUtils will complain if it can't determine the
directive handler prototype (args_how), rather than fail during 'make'
1.130 +8 -4 modperl/ToDo
Index: ToDo
===================================================================
RCS file: /home/cvs/modperl/ToDo,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -r1.129 -r1.130
--- ToDo 1998/12/11 23:04:00 1.129
+++ ToDo 1998/12/14 20:58:44 1.130
@@ -3,13 +3,17 @@
(well, close to it anyhow)
---------------------------------------------------------------------------
-- turn of strip of httpd in Apache's install.sh
+- Makefile.PL saying: Can't stat : No such file or directory
-- -e and setuid problem (Steve Neilsen)
+- internal/auth.......FAILED test 1 (w/o mod_autoindex)
-- method handler called when it shouldn't be? (Ken)
+- install os-inline.c
+
+- avoid write_client symtab lookup in print()
-- $ENV{MOD_PERL} is inherited by subprocesses, must stop this
+- turn of strip of httpd in Apache's install.sh
+
+- method handler called when it shouldn't be? (Ken)
- Apache::Status extensions (ix)
1.24 +0 -3 modperl/lib/mod_perl.pm
Index: mod_perl.pm
===================================================================
RCS file: /home/cvs/modperl/lib/mod_perl.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- mod_perl.pm 1998/12/01 00:11:16 1.23
+++ mod_perl.pm 1998/12/14 20:58:45 1.24
@@ -33,9 +33,6 @@
return;
}
- $ENV{MOD_PERL} = $mod_perl::VERSION;
- $ENV{GATEWAY_INTERFACE} = "CGI-Perl/1.1";
-
return unless @_;
if($_[0] =~ /^\d/) {
1.61 +5 -9 modperl/src/modules/perl/mod_perl.c
Index: mod_perl.c
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- mod_perl.c 1998/11/30 14:59:44 1.60
+++ mod_perl.c 1998/12/14 20:58:46 1.61
@@ -486,8 +486,9 @@
char *argv[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
char **list, *dstr;
int status, i, argc=1;
+#ifdef WIN32
char *dash_e = "BEGIN { $ENV{MOD_PERL} = 1; $ENV{GATEWAY_INTERFACE} = 'CGI-Perl/1.1'; }";
- char *line_info = "#line 1 mod_perl";
+#endif
dPSRV(s);
SV *pool_rv, *server_rv;
GV *gv, *shgv;
@@ -566,16 +567,13 @@
if(cls->PerlWarn)
argv[argc++] = "-w";
-#ifdef PERL_MARK_WHERE
+#ifdef WIN32
argv[argc++] = "-e";
- argv[argc++] = line_info;
+ argv[argc++] = dash_e;
#else
- line_info = NULL;
+ argv[argc++] = "/dev/null";
#endif
- argv[argc++] = "-e";
- argv[argc++] = dash_e;
-
MP_TRACE_g(fprintf(stderr, "perl_parse args: "));
for(i=1; i<argc; i++)
MP_TRACE_g(fprintf(stderr, "'%s' ", argv[i]));
@@ -747,8 +745,6 @@
if(MP_SENDHDR(cld))
MP_SENTHDR_off(cld);
-
- table_set(r->subprocess_env, "MOD_PERL", MOD_PERL_VERSION);
(void)perl_request_rec(r);
1.24 +6 -0 modperl/src/modules/perl/perl_util.c
Index: perl_util.c
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/perl_util.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- perl_util.c 1998/11/30 01:30:51 1.23
+++ perl_util.c 1998/12/14 20:58:46 1.24
@@ -600,6 +600,12 @@
HV *hv = (HV*)GvHV(envgv);
sv_unmagic((SV*)hv, 'E');
+ if(!hv_exists(hv, "MOD_PERL", 8)) {
+ hv_store(hv, "MOD_PERL", 8,
+ newSVpv(MOD_PERL_STRING_VERSION,0), FALSE);
+ hv_store(hv, "GATEWAY_INTERFACE", 17,
+ newSVpv("CGI-Perl/1.1",0), FALSE);
+ }
(void)hv_iterinit(hv);
while ((val = hv_iternextsv(hv, (char **) &key, &klen))) {
if((*key == 'G') && strEQ(key, "GATEWAY_INTERFACE"))
1.29 +5 -0 modperl/t/docs/startup.pl
Index: startup.pl
===================================================================
RCS file: /home/cvs/modperl/t/docs/startup.pl,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- startup.pl 1998/11/30 14:59:44 1.28
+++ startup.pl 1998/12/14 20:58:48 1.29
@@ -1,4 +1,9 @@
#! /usr/local/bin/perl
+
+unless (defined $ENV{MOD_PERL}) {
+ die "\$ENV{MOD_PERL} not set!";
+}
+
BEGIN {
#./blib/lib:./blib/arch
use ExtUtils::testlib;
1.35 +4 -1 modperl/t/net/perl/api.pl
Index: api.pl
===================================================================
RCS file: /home/cvs/modperl/t/net/perl/api.pl,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- api.pl 1998/11/28 00:25:45 1.34
+++ api.pl 1998/12/14 20:58:51 1.35
@@ -16,7 +16,7 @@
my $is_xs = ($r->uri =~ /_xs/);
-my $tests = 51;
+my $tests = 52;
my $is_win32 = WIN32;
$tests += 2 unless $is_win32;
my $test_get_set = Apache->can('set_handlers') && ($tests += 4);
@@ -30,6 +30,9 @@
$r->send_http_header;
$r->print("1..$tests\n");
+
+test ++$i, $ENV{MOD_PERL};
+print "ENV{MOD_PERL} = $ENV{MOD_PERL}\n";
#backward compat
%ENV = $r->cgi_env;