Re: cleaning perl code

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Dilger <mark.dilger@enterprisedb.com>
Cc: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>, Noah Misch <noah@leadboat.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-04-11T17:41:56Z
Lists: pgsql-hackers
Mark Dilger <mark.dilger@enterprisedb.com> writes:
> I'm less concerned with which perlcritic features you enable than I am with accidentally submitting perl which looks fine to me but breaks the build.  I mostly use perl from within TAP tests, which I run locally before submission to the project.  Can your changes be integrated into the TAP_TESTS makefile target so that I get local errors about this stuff and can fix it before submitting a regression test to -hackers?

As far as that goes, I think crake is just running

src/tools/perlcheck/pgperlcritic

which you can do for yourself as long as you've got perlcritic
installed.

			regards, tom lane



Commits

  1. Stop requiring an explicit return from perl subroutines

  2. Use perl's $/ more idiomatically

  3. Use perl warnings pragma consistently