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

Re: Pre-RFC: yield true feature

Thread Previous | Thread Next
From:
Alexander Hartmaier
Date:
June 23, 2022 15:07
Subject:
Re: Pre-RFC: yield true feature
Message ID:
CAB49QrZdmwfk28fs4mhhpX5j9Bzj0f6jTUxs7yWOtJ_Ggck-1g@mail.gmail.com
On Wed, Jun 22, 2022 at 1:19 AM Yuki Kimoto <kimoto.yuki@gmail.com> wrote:

> Summary.
>
> Are we going in the following direction?
>
> If the "yield_true" feature is enabled,
>
>   - the effect is local-scope. Generally the "yield_true" feature is used
> at the top level file scope.
>   - It has no effect on the return value of .pm file. Both an implicit
> return value and an explicit return value specified by return statement.
>   - "require" ignores the return value to determine if the module was
> successfully loaded.
>   - "require" returns the return value of .pm file just like the current
> behavior.
>
> Thanks for the summary!
So point 3 is what should be changed, 1 is an implementation detail and the
other two are just how require already works?

'require' currently checks the return value and throws an exception if it's
false in boolean context. This check should be disabled by the feature.

Correct?

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