Re: perl checking - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: perl checking
Date
Msg-id 043efe11-a44d-372d-de57-6c2bb1a2b095@2ndQuadrant.com
Whole thread Raw
In response to Re: perl checking  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers

On 05/18/2018 09:05 PM, Peter Eisentraut wrote:
> On 5/18/18 14:02, Andrew Dunstan wrote:
>> These two small patches allow us to run "perl -cw" cleanly on all our
>> perl code.
> It's not clear to me what that really means.  My understanding is that
> perl "warnings" are primarily a run-time instrument, unlike 'use strict'
> and perl -c.  I have been playing with a private branch that adds 'use
> warnings' next to 'use strict' across the perl scripts, and there are a
> number of warnings that pop up at run time.  The fact that you get even
> more warnings at compile time makes me wonder.
>


Mike Blackwell is working on some things that will help us lower the 
severity of our perlcritic checks. One of those things will almost 
certainly be to add "use warnings;" in quite a few places, so let's make 
sure we don't duplicate effort.

Essentially "perl -cw" will make dure it can comoile the file and then 
print warnings about those things it can detect at compile time. I have 
found it a useful tool.

More importantly, there are several files in our Windows suite that a 
Unix-based developer can't check even for compilation success, let alone 
warnings, because they refer to libraries that only exist on Windows. 
That's what the tiny dummy library is designed to fix.

cheers

andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: PG 11 feature count
Next
From: Amit Langote
Date:
Subject: Re: Should we add GUCs to allow partition pruning to be disabled?