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

Re: [perl #113974] package NAMESPACE manpage comments

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
July 7, 2012 10:31
Subject:
Re: [perl #113974] package NAMESPACE manpage comments
Message ID:
CAHhgV8isAAb+Ly2pns_jwzQjGRdR9vDrHtTxzU3+MTjQi2MV2w@mail.gmail.com
On Sat, Jul 7, 2012 at 12:39 PM, Linda W <perl-diddler@tlinx.org> wrote:
> Perfectly good?
>
> Your perfect maybe,
>
> Why not just make use vars qw(xxx)
> into
>
> vars $one, $two;

Why would we? Package vars is not something people should be using
often anyway in modular Perl, having a yet another option for handling
them seems rather superfluous. Besides, it's not like these difference
matter in clean code anyway.

> and have it be what our was supposed to be?
>
> Then you can have your cake and vars can too!

Because the lexical scope reduces action at a distance to something
that's predictable, even if it's occasionally not what you want.

Leon

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