Re: perlcritic

From: David Fetter <david(at)fetter(dot)org>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: perlcritic
Date: 2015-09-01 15:37:17
Message-ID: 20150901153717.GE7012@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 01, 2015 at 11:26:27AM -0400, Robert Haas wrote:
> On Tue, Sep 1, 2015 at 9:58 AM, Andrew Dunstan <andrew(at)dunslane(dot)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.)

I believe there are ways to get perlcritic to keep quiet about things
we don't find relevant. Maybe that's a better way to use it.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2015-09-01 15:41:43 Re: [PROPOSAL] Effective storage of duplicates in B-tree index.
Previous Message Robert Haas 2015-09-01 15:26:27 Re: perlcritic