Return-Path: Delivered-To: apmail-httpd-test-dev-archive@www.apache.org Received: (qmail 70443 invoked from network); 10 Mar 2004 22:42:55 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 10 Mar 2004 22:42:55 -0000 Received: (qmail 32203 invoked by uid 500); 10 Mar 2004 22:42:42 -0000 Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 32174 invoked by uid 500); 10 Mar 2004 22:42:42 -0000 Mailing-List: contact test-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-dev@httpd.apache.org Received: (qmail 32160 invoked from network); 10 Mar 2004 22:42:41 -0000 Received: from unknown (HELO mail.logilune.com) (195.154.174.52) by daedalus.apache.org with SMTP; 10 Mar 2004 22:42:41 -0000 Received: from stason.org (localhost.logilune.com [127.0.0.1]) by mail.logilune.com (Postfix) with ESMTP id A68D41E179D for ; Wed, 10 Mar 2004 23:42:46 +0100 (CET) Message-ID: <404F99E5.8010906@stason.org> Date: Wed, 10 Mar 2004 14:42:45 -0800 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 To: test-dev@httpd.apache.org Subject: Re: Failures in TestRun.pm with A::T 1.09 References: <20040310220134.GA11385@knowmad.com> In-Reply-To: <20040310220134.GA11385@knowmad.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 William McKee wrote: > Hi Stas, > > I recently upgraded my workstation for A::T 1.07 to 1.09. Immediately > upon doing so, I started to receive test failures. It turns out that > these failures were due to lines 613 and 1573 of Apache::TestRun. The > error was actually a warning as follows: > > Statement unlikely to be reached at > /usr/local/lib/perl5/site_perl/5.8.2/i686-linux/Apache/TestRun.pm line > 613. > > However, following the examples I've seen for TEST.PL, I had the > following line in my TEST script: > > use warnings FATAL => 'all'; > > This caused the tests to fail. I tried reinstalling Apache::Test 1.07 > and 1.08 but neither made any difference. I don't know why this started > showing up in 1.09, but it seems like it should be removed. I've > attached a diff that comments out these lines. That's strange. What kind of Perl build do you have? According to the exec manpage this is perfectly correct code: exec PROGRAM LIST The "exec" function executes a system command and never returns-- use "system" instead of "exec" if you want it to return. It fails and returns false only if the command does not exist and it is executed directly instead of via your sys- tem's command shell (see below). Since it's a common mistake to use "exec" instead of "system", Perl warns you if there is a following statement which isn't "die", "warn", or "exit" (if "-w" is set - but you always do that). If you really want to follow an "exec" with some other statement, you can use one of these styles to avoid the warn- ing: exec ('foo') or print STDERR "couldn't exec foo: $!"; { exec ('foo') }; print STDERR "couldn't exec foo: $!"; so: exec $foo; die "shouldn't be reached"; should generate no warnings. Do you get this problem when running: % perl -lwe 'use warnings; exec "echo ok"; die "should not be reached"' __________________________________________________________________ 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