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

Re: Announcing Perl 7

Thread Previous | Thread Next
From:
Darren Duncan
Date:
July 4, 2020 01:14
Subject:
Re: Announcing Perl 7
Message ID:
4dfd63e7-4c72-d11f-d40f-e45f2b3aa4fe@darrenduncan.net
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


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