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

Re: Announcing Perl 7

Thread Previous | Thread Next
Darren Duncan
July 4, 2020 01:14
Re: Announcing Perl 7
Message ID:
On 2020-07-03 10:47 a.m., demerphq wrote:
> ---
> package Foo; # parsed as v-latest but it doesn't matter.
> use v7; # give me well defined semantics
> use strict; # no op
> ---

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.

To me, this always seemed the best order for things:

<file start>
#optional shebang line
use vN;
use other pragmas;
use other non-imported modules;
package MyPackage;
use symbol-importing modules;
<rest of the code>

This also means that the "use v" statement is always the first thing in the 
file, before EVERYTHING else, and sets a context for the rest.

-- Darren Duncan

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