[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [SCM] Debian package checker branch, master, updated. 2.5.2-11-g39af0d7



"Niels Thykier" <niels@thykier.net> writes:

>     Perlcritic cleaned c/standards-version

> -our $STANDARDS = Lintian::Data->new('standards-version/release-dates', '\s+');
> +my $STANDARDS = Lintian::Data->new('standards-version/release-dates', qr/\s+/o);

These are file globals -- why would one use my instead of our?  Do you
know what the rationale of perlcritic is here?

> -our $CURRENT   = $STANDARDS[0][0];
> -our @CURRENT   = split(/\./, $CURRENT);
> +my $CURRENT_VER = $STANDARDS[0][0];
> +my @CURRENT     = split(m/\./, $CURRENT_VER);

*grumble*.  This is one of the reasons why I don't particularly like
perlcritic.  Those two variables contain exactly the same information,
just in one case as a string and in another case as an array, which you
can represent in Perl with the same variable name as a scalar and as an
array.  Using different variable names for them is obfuscating, not adding
clarity.

I don't really care that much, and I'm all in favor of picking a coding
style and following it uniformly even if it isn't the one I'd choose, so
I'm not saying to change this back.  But I do think perlcritic is wrong
about this.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: