Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 58253 invoked from network); 2 Oct 2003 00:31:52 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Oct 2003 00:31:52 -0000 Received: (qmail 82867 invoked by uid 500); 2 Oct 2003 00:31:35 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 82855 invoked by uid 500); 2 Oct 2003 00:31:35 -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 82832 invoked from network); 2 Oct 2003 00:31:34 -0000 Received: from unknown (HELO mail26c.sbc-webhosting.com) (216.173.237.166) by daedalus.apache.org with SMTP; 2 Oct 2003 00:31:34 -0000 Received: from www.paradigm-healthcare.com (64.143.31.108) by mail26c.sbc-webhosting.com (RS ver 1.0.87vs) with SMTP id 4-0319444689 for ; Wed, 1 Oct 2003 20:31:29 -0400 (EDT) Message-ID: <086e01c3887c$69aca430$8a01a8c0@PHS> From: "ydnar" To: References: <086101c38876$870ed300$8a01a8c0@PHS> <3F7B69C4.5040303@stason.org> Subject: Re: [mp2] useless warning on ModPerl::Util::exit() Date: Wed, 1 Oct 2003 17:30:42 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Loop-Detect: 1 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > ydnar wrote: > > Thanks for your reply. > > > > Here's a short module that will throw the warning. > > Thanks. > > > Note, my httpd.conf uses PerlSwitches -wT. Removing -w and using "use > > warnings FATAL => 'all';" does *not* reproduce the problem. > > That's obvious. Obvious to whom? > > package SHN::Exit; > > use strict; > > use ModPerl::Util; > > use Apache::RequestRec; > > use Apache::RequestIO; > > sub handler > > { > > my $r = shift; > > $r->content_type( "text/plain" ); > > print "End of line.\n"; > > exit 0; > > } > > 1; > > Does it make any difference if you do: > > - exit 0; > + ModPerl::Util::exit(); > + return Apache::OK; Isn't the point of exit() to stop execution of the particular thread of code? The exit test handler has code below the call to ModPerl::Util::exit() commented "not reached." I assume this means that exit() works as-advertised. > may I ask, why do you call exit? There are a few places internally where processing can fail. Certain functions return user-friendly error messages to the browser and exit() instead of returning to the calling script/module. > Also you didn't answer my 2 questions below. Your first question was answered in my initial email. It occurs with 5.8.1. It also occurs with 5.8.0 and mod_perl 1.99.09 as well, if you care. It does not occur when running the t/TEST script. I was not able to modify t/response/TestModperl/exit.pm to reproduce either. Hence the example handler as you requested. > [...] > >>>Useless warning in error_log: > >>> > >>> [Mon Sep 29 16:43:15 2003] -e: Use of uninitialized value. > >>> > >>>This occurs whenever a handler script calls ModPerl::Util::exit() > >>>or simply exit(). There is no other available information. > >>> > >>>Running Perl 5.8.0 and mod_perl 1.99.10, both fresh rebuilds from > >>>source today. > >> > >>According to your report you are running 5.8.1: > >> > >> > *** /usr/bin/perl -V > >> > Summary of my perl5 (revision 5.0 version 8 subversion 1) > > So which one do you have the problem with 5.8.0 or 5.8.1? > > > configuration: > > > >>I tested it with 5.8.0 and 5.8.1, but I can't get to reproduce it. > >> > >>Do you get this problem if you run this test: > >> > >>cd modperl-1.99-dev > >>t/TEST -v modperl/exit > >> > >>run: > >> > >>tail -F t/logs/error_log > >> > >>in another console and see if you get this warnings. If not, please post a > >>very short handler which we can reproduce the problem with (ideally adjust > >>t/response/TestModperl/exit.pm to reproduce it). > > And? > > __________________________________________________________________ > Stas Bekman JAm_pH ------> Just Another mod_perl Hacker > http://stason.org/ mod_perl Guide ---> http://perl.apache.org > mailto:stas@stason.org http://use.perl.org http://apacheweek.com > http://modperlbook.org http://apache.org http://ticketmaster.com > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org