develooper Front page | perl.perl5.porters | Postings from July 2020

Re: Announcing Perl 7

Thread Previous | Thread Next
Karen Etheridge
July 4, 2020 04:28
Re: Announcing Perl 7
Message ID:
On Fri, Jul 3, 2020 at 6:14 PM Darren Duncan <>

> Personally I never understood why so many people write their file scope
> pragmas
> or non-symbol-installing package declarations within the current file's
> class
> declaration rather than before it.

I do:

    use strict;
    use warnings;
    package Foo;

..because I have tooling that inserts an 'our $VERSION = ...' declaration
into packages that are missing them, in the line immediately following the
package declaration, and perlcritic tends to complain if there is any code
that precedes a 'use strict'. It seems fairly natural to me to do it this
way, and it seems quite logical to place a 'use vX' declaration as early on
in the file as possible, as it would affect the parsing of that file (just
as 'use utf8' does).

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