develooper Front page | perl.perl5.porters | Postings from June 2015

Re: Question/suggestion on perlfunc.pod example

Thread Previous | Thread Next
From:
Eric Brine
Date:
June 19, 2015 19:49
Subject:
Re: Question/suggestion on perlfunc.pod example
Message ID:
CALJW-qGBoxBkRdWY6qaYj185FxrW=5LoLEyYqFHPQmpokrpb+g@mail.gmail.com
On Fri, Jun 19, 2015 at 2:46 PM, Eirik Berg Hanssen <
Eirik-Berg.Hanssen@allverden.no> wrote:

> On Fri, Jun 19, 2015 at 8:05 PM, Eric Brine <ikegami@adaelis.com> wrote:
>
>> On Mon, Jun 8, 2015 at 6:25 AM, Aristotle Pagaltzis <pagaltzis@gmx.de>
>> wrote:
>>
>>> * Eric Brine <ikegami@adaelis.com> [2015-06-08 00:40]:
>>> > The code used to fail on false just like require, but you changed it
>>> > so now it just fails on undefined. Why? This seems error-prone to me.
>>>
>>> What is error-prone about not failing on a value that cannot come from
>>> a failure?
>>>
>>
>> Not warning when it's known that "1;" isn't present is error-prone
>> because changes to unrelated code could suddenly cause the do to start
>> failing.
>>
>
>  Couldn't changes to unrelated code suddenly cause the do to start failing
> whether or not it is known if the "1;" is there?
>

Yes, changes to unrelated code can suddenly cause the "do" to start
failing. That's why we should warn we do know it's likely there's doing to
be a problem. That's the practice the docs was recommending, but is being
removed by AP.

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