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

Re: Pre-RFC: a `module` keyword

Thread Previous
From:
Paul "LeoNerd" Evans
Date:
January 24, 2022 22:57
Subject:
Re: Pre-RFC: a `module` keyword
Message ID:
20220124225729.60b46f44@shy.leonerd.org.uk
On Mon, 24 Jan 2022 14:46:35 -0800
Chad Granum <exodist7@gmail.com> 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

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About