On Tue, 25 Jan 2022 at 06:47, 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. > Too fragile... Compare this: module Example { print "$x" } # compilation error, since `use strict` is in effect and this: # See examples/whatever.pl for practical uses of this module module Example { print "$x" } # since this is no longer the first line, we have no `strict`, no `warnings` Plus all the usual versioning problems - defaults that seem reasonable now will be outdated by the time Perl 5.46 is released.Thread Previous | Thread Next