develooper Front page | perl.perl5.porters | Postings from September 2010

RE: warn always returns true

Thread Previous | Thread Next
From:
Jan Dubois
Date:
September 21, 2010 11:09
Subject:
RE: warn always returns true
Message ID:
00c301cb59b8$2ec22100$8c466300$@activestate.com
On Tue, 21 Sep 2010, John Peacock wrote:
> On 09/21/2010 01:33 PM, Zsbán Ambrus wrote:
>> On Mon, Sep 20, 2010 at 12:40 AM,
>> Dr.Ruud<rvtol+usenet@isolution.nl> wrote:
>>> I think it should be documented that warn() always returns true.
>>> (and die() too?)
>>
>> die never returns.
>
> Except in an eval block... ;-)

No, it doesn't.  die() never returns control flow to the following
statement inside the same lexical scope.  And the return value of
the eval block is *not* the return value of the die() anyways...

die() doesn't have a return value, just like return().

Cheers,
-Jan


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About