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

Re: Pre-RFC: yield true feature

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
June 20, 2022 07:41
Subject:
Re: Pre-RFC: yield true feature
Message ID:
YrAkgWM1KE5vNcFt@iabyn.com
On Sun, Jun 19, 2022 at 06:06:00PM -0700, Darren Duncan wrote:
> It seems to me that if a lexically scoped yield_true isn't going to behave
> as I indicated, affecting the results of subroutines as well, then I would
> say maybe the feature is badly named.

I don't think anyone has proposed that.

I am proposing that, for the one specific case where perl has just exited
during execution of a require'd src file, then the special check it
currently does (on whether the return value is zero) should be skipped if
'yield_true' was in scope at the statement where the code returned
(or fell off the end).

The pragma will have no effect whatsoever on the return value of
functions.

-- 
Overhead, without any fuss, the stars were going out.
    -- Arthur C Clarke

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