develooper Front page | perl.perl5.porters | Postings from February 2017

Re: The tricky issue of do()

Thread Previous | Thread Next
From:
Chad Granum
Date:
February 23, 2017 21:46
Subject:
Re: The tricky issue of do()
Message ID:
CAJFr3ktQwwB0Nb086QuyTc3ttogOdVjEXWzMz2BAk1VBpKAQJQ@mail.gmail.com
I would use the hell out of a sane_do feature.

On Thu, Feb 23, 2017 at 1:43 PM, Karl Williamson <public@khwilliamson.com>
wrote:

> On 2/23/2017 1:23 PM, Zefram wrote:
>
>> Todd Rinaldo wrote:
>>
>>> Wow! I assumed it would die. But it's even worse. $@ appears to be empty.
>>> I think you have to check $! for do.
>>>
>>
>> Yeah, that too.  The formulation one normally wants for do is
>>
>>         do "foo.pl" or die $@ || $!;
>>
>> That a failure can show up in either $! or $@, and is never signalled
>> as an exception, is long-standing and documented.  We can't change this.
>>
>> -zefram
>>
>>
> If it really is the case that we can't change it, this sounds important
> enough to make new behavior turned on via a feature, say
>
> "use feature 'sane_do'"
>

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