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

Re: Pre-RFC: a `library` keyword

Thread Previous | Thread Next
From:
Yuki Kimoto
Date:
April 3, 2022 23:45
Subject:
Re: Pre-RFC: a `library` keyword
Message ID:
CAExogxNR6mk4mbfr2CQ-UEan1zrAPAu+JvuJBaYE74OHC0Lejw@mail.gmail.com
2022-4-1 23:16 Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> wrote:

>
> I forget what we called them but those could be spelled:
>
>   use feature qw(export_attr yield_true);
>
>   package Some::Module v1.23 {
>     sub this_is_exported :export { ... }
>
>     sub this_method_is_not { ... }
>
>     my sub this_is_lexically_private { ... }
>   }
>
>   # no need for "1;" here because of the yield_true feature
>
>
I ask a question about  yield_true feature.

This example seems to be adding "1;" to the end of the file scope.

Can yield_true feature be implemented actually as a file scope, not as a
global scope?

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