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

Re: Pre-RFC: yield true feature

Thread Previous | Thread Next
Eric Brine
June 7, 2022 15:52
Re: Pre-RFC: yield true feature
Message ID:
On Tue, Jun 7, 2022 at 1:59 AM Tony Cook <> wrote:

> There would be no change for "do", it doesn't require truthiness.

C<do> actually does require the return of a true value if you want to
detect failures.

do(...) or die $!;   # File not found, etc
die $@ if $@;        # Syntax error, runtime exception, etc

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About