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

Re: Pre-RFC: yield true feature

Thread Previous | Thread Next
From:
Martijn Lievaart
Date:
June 14, 2022 17:01
Subject:
Re: Pre-RFC: yield true feature
Message ID:
1524aa66-91ff-241b-0cb3-3af9598575de@rtij.nl
Op 14-06-2022 om 18:13 schreef Graham Knop:
> On Tue, Jun 14, 2022 at 6:02 PM Alexander Hartmaier
> <alex.hartmaier@gmail.com> wrote:
>>
>> For example https://metacpan.org/dist/DT/source/lib/DT.pm#L49
> This only cares that require returns a true value, and avoids calling
> return again in the future if so.


Nitpick, 'require' always returns a truthy value, otherwise it dies. So 
this is just a cute shorthand for 'require DateTime::Format::Pg; 
$HAVE_PG=1'.


HTH,

M4



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