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.