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

Re: RFC 0004 - defer {} syntax

Thread Previous | Thread Next
From:
Yuki Kimoto
Date:
June 20, 2021 23:52
Subject:
Re: RFC 0004 - defer {} syntax
Message ID:
CAExogxNkzEXuLG7AMU9dduiinbLMY+7cVVwvMdooTBdrsg5rwQ@mail.gmail.com
2021-6-18 17:55 Martijn Lievaart <m@rtij.nl>:

> 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.
>
>
> HTH,
>
> M4
>
>
>
Martijn, thank you.

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