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@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.)
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@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate