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

Re: Announcing Perl 7

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
July 4, 2020 10:58
Subject:
Re: Announcing Perl 7
Message ID:
20200704115816.56ea15c2@shy.leonerd.org.uk
On Fri, 3 Jul 2020 21:28:14 -0700
Karen Etheridge <perl@froods.org> wrote:

> On Fri, Jul 3, 2020 at 6:14 PM Darren Duncan <darren@darrenduncan.net>
> wrote:
> 
> > 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;

I always used to

  package Thingy;

  use strict;
  use warnings;
  ...

But lately, the more I write using Object::Pad (which needs to appear
-before- the class statement), I've taken to writing

  use v5.26;  # signatures
  use Object::Pad 0.19;

  class My::Class::Here;
  ...

-- 
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 | 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