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

Re: RFC 0004 - defer {} syntax

Thread Previous | Thread Next
Martijn Lievaart
June 18, 2021 08:55
Re: RFC 0004 - defer {} syntax
Message ID:
Op 18-06-2021 om 03:16 schreef Yuki Kimoto:
> I read the content of the Github issue again.
> defer block is like END block that runs at the end of the scope, isn't it?
> I feel this syntax is natural for Perl users now.
> It seems that some pseudo-things are implemented on CPAN as well.

Yes and no. Yes, it's like that, because it runs on the end of a scope, 
like END does at the end of the run. No, it's not like that as END 
blocks always run when compiled, but defer is a statement that must be 
executed for it to have it's effect.



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