Re: perlcritic - Mailing list pgsql-hackers

From Robert Haas
Subject Re: perlcritic
Date
Msg-id CA+Tgmobyspgf3Cwcw09rRtsWSfnERSd_nUO+r8qAn1G8tMhunw@mail.gmail.com
Whole thread Raw
In response to Re: perlcritic  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: perlcritic  (David Fetter <david@fetter.org>)
Re: perlcritic  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
On Tue, Sep 1, 2015 at 9:58 AM, Andrew Dunstan <andrew@dunslane.net> wrote:
> On 08/31/2015 11:57 PM, Peter Eisentraut wrote:
>> We now have 80+ Perl files in our tree, and it's growing.  Some of those
>> files were originally written for Perl 4, and the coding styles and
>> quality are quite, uh, divergent.  So I figured it's time to clean up
>> that code a bit.  I ran perlcritic over the tree and cleaned up all the
>> warnings at level 5 (the default, least severe).
>
> I don't object to this. Forcing strict mode is good, and I think I stopped
> using bareword file handles around 17 years ago.

FWIW, I think perlcritic is both useless and annoying.  I've always
used bareword file handles, and I don't really see what the problem
with it is, especially in very short script files.  And what's wrong
with two-argument form of open, if the path is a constant rather than
possibly-tainted user input?  Perl advertises that TMTOWTDI, and then
perlcritic complains about which one you picked, mostly AFAICS for no
particularly compelling reason.  So I'm pretty meh about this whole
exercise, especially if we follow it up by cleaning up the lower
levels of warnings which, from what I can see, are unnecessary
pedantry on top of unnecessary pedantry.

But I suspect I'm in the minority here, so feel free to ignore me.  (I
certainly do agree that use strict and use warnings are a good thing
to use everywhere.  It's just perlcritic I dislike.)

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: "Shulgin, Oleksandr"
Date:
Subject: Re: On-demand running query plans using auto_explain and signals
Next
From: David Fetter
Date:
Subject: Re: perlcritic