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

Re: Pre-RFC: a `module` keyword

Thread Previous
Paul "LeoNerd" Evans
January 24, 2022 22:57
Re: Pre-RFC: a `module` keyword
Message ID:
On Mon, 24 Jan 2022 14:46:35 -0800
Chad Granum <> wrote:

> What about auto-including the 'feature' if the very first line
> (second if there is a shebang) started with the 'module' keyword?
> That would be very unlikely to break compatibility with existing
> code, and allows less boilerplate for module-only files. Might not
> need the block scope in such cases either.

I think that was the conclusion we came to in Amsterdam.

*technically* it's possible someone might write some code like this,
but that's fantastically unlikely:

   module($_) for qw( some args here );

   sub module { ... }

Much less likely if you try to find something with the parens in there.

Paul "LeoNerd" Evans      |  |

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