Re: pgsql: Skip \password TAP test on old IPC::Run versions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Daniel Gustafsson <dgustafsson(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Skip \password TAP test on old IPC::Run versions
Date: 2023-04-08 16:23:49
Message-ID: 3588535.1680971029@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Stylistic nitpick: It's not necessary to have 2 evals here:

> +   skip "IO::Pty and IPC::Run >= 0.98 required", 1 unless
> +       (eval { require IO::Pty; } && eval { $IPC::Run::VERSION >=
> '0.98' });

> just say "eval { require IO::Pty; return $IPC::Run::VERSION >= '0.98'; }"

What I was wondering about was if it's safe to depend on the VERSION
being fully numeric. Can't we write "use IPC::Run 0.98;" and let
some other code manage the version comparison?

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2023-04-08 17:44:10 Re: pgsql: Try to unbreak MSVC builds for pg_waldump
Previous Message Tom Lane 2023-04-08 15:48:55 pgsql: Improve indentation of multiline initialization expressions.