Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 90418 invoked from network); 15 Jan 2005 03:13:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Jan 2005 03:13:11 -0000 Received: (qmail 80751 invoked by uid 500); 15 Jan 2005 03:13:10 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 80728 invoked by uid 500); 15 Jan 2005 03:13:10 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 80715 invoked by uid 99); 15 Jan 2005 03:13:09 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of mawic@gmx.de designates 213.165.64.20 as permitted sender) Received: from pop.gmx.de (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.28) with SMTP; Fri, 14 Jan 2005 19:13:09 -0800 Received: (qmail invoked by alias); 15 Jan 2005 03:13:06 -0000 Received: from dsl-082-082-180-144.arcor-ip.net (EHLO [82.82.180.144]) (82.82.180.144) by mail.gmx.net (mp006) with SMTP; 15 Jan 2005 04:13:06 +0100 X-Authenticated: #20142289 Message-ID: <41E88A40.4010808@gmx.de> Date: Sat, 15 Jan 2005 04:13:04 +0100 From: Markus Wichitill User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en, de MIME-Version: 1.0 To: modperl-dev Subject: [PATCH] Show Apache and Perl environment in Apache::Status 2.x X-Enigmail-Version: 0.89.6.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Index: lib/Apache/Status.pm =================================================================== --- lib/Apache/Status.pm (revision 125243) +++ lib/Apache/Status.pm (working copy) @@ -345,12 +345,12 @@ sub status_env { my ($r) = shift; + # show perl environment my @retval = ("

\n"); - if ($r->handler eq 'modperl') { # the handler can be executed under the "modperl" handler push @retval, - qq{Under the "modperl" handler, the environment is:}; + qq{Under the "modperl" handler, the Perl %ENV is:}; # XXX: I guess we could call $r->subprocess_env; and show how # would it look like under the 'perl-script' environment, but # under the 'modperl' handler %ENV doesn't get reset, @@ -359,13 +359,22 @@ } else { # the handler can be executed under the "perl-script" handler push @retval, - qq{Under the "perl-script" handler, the environment is:}; + qq{Under the "perl-script" handler, the Perl %ENV is:}; } push @retval, "\n

\n"; push @retval, "
",
          (map "$_ = " . escape_html($ENV{$_}||'') . "\n",
              sort keys %ENV), "
"; + # show apache environment + my $ap_env = $r->subprocess_env(); + push @retval, "\n

\n"; + push @retval, qq{The Apache subprocess_env is:}; + push @retval, "\n

\n"; + push @retval, "
",
+        (map "$_ = " . escape_html($ap_env->{$_}||'') . "\n",
+            sort keys %$ap_env), "
"; + \@retval; } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org