Re: cleaning perl code

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-04-09T17:47:08Z
Lists: pgsql-hackers
On Thu, Apr 9, 2020 at 11:44 AM Andrew Dunstan
<andrew.dunstan@2ndquadrant.com> wrote:
> We currently only run perlcritic at severity level 5, which is fairly
> permissive. I'd like to reduce that, ideally to, say, level 3, which is
> what I use for the buildfarm code.
>
> But let's start by going to severity level 4.

I continue to be skeptical of perlcritic. I think it complains about a
lot of things which don't matter very much. We should consider whether
the effort it takes to keep it warning-clean has proportionate
benefits.

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



Commits

  1. Stop requiring an explicit return from perl subroutines

  2. Use perl's $/ more idiomatically

  3. Use perl warnings pragma consistently