pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Follow-up fixes for "Make all Perl warnings fatal"
Date: Wed, 3 Jan 2024 13:14:44 +0100
Message-ID: <14c9cb82-46e5-4be0-9233-36d09089dd11@eisentraut.org> (raw)
In-Reply-To: <b936521f-a79e-4ddd-d9a4-1864212d7bb1@dunslane.net>
References: <E1rJLlz-00CYAB-5m@gemulon.postgresql.org>
	<b936521f-a79e-4ddd-d9a4-1864212d7bb1@dunslane.net>

On 02.01.24 15:49, Andrew Dunstan wrote:
> 
> On 2023-12-29 Fr 17:56, Peter Eisentraut wrote:
>> Follow-up fixes for "Make all Perl warnings fatal"
>>
>> Mostly, we need to check whether $ENV{PG_TEST_EXTRA} is set before
>> doing regular expression matches against it.
> 
> 
> This reads a bit oddly to me.
> 
> -elsif ($ENV{PG_TEST_EXTRA} !~ /\bkerberos\b/)
> +elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bkerberos\b/)
> 
> I think I would have changed it like this
> 
>    elsif (($ENV{PG_TEST_EXTRA" || "") !~ /\bkerberos\b/)
> 
> which is an idiom we've used elsewhere.

I would probably have written it that way, too, but there was already 
existing code dealing specifically with PG_TEST_EXTRA that was written 
the other way, so I made it match that.






view thread (3+ messages)

Message-ID: <14c9cb82-46e5-4be0-9233-36d09089dd11@eisentraut.org>
Permalink:  ../14c9cb82-46e5-4be0-9233-36d09089dd11@eisentraut.org/
Also on:    postgresql.org/message-id/14c9cb82-46e5-4be0-9233-36d09089dd11@eisentraut.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, andrew@dunslane.net, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Follow-up fixes for "Make all Perl warnings fatal"
  In-Reply-To: <14c9cb82-46e5-4be0-9233-36d09089dd11@eisentraut.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox