From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Skip \password TAP test on old IPC::Run versions
Date: Sat, 08 Apr 2023 16:30:00 -0400
Message-ID: <3618405.1680985800@sss.pgh.pa.us> (raw)
In-Reply-To: <627E6024-7803-473C-91AF-E8D76C3D99E0@yesql.se>
References: <E1pl943-0023OF-Ol@gemulon.postgresql.org>
<6d880ea2-f8ca-f458-4dcd-a7a3e6d6cd7c@dunslane.net>
<3588535.1680971029@sss.pgh.pa.us>
<627E6024-7803-473C-91AF-E8D76C3D99E0@yesql.se>
Daniel Gustafsson <daniel@yesql.se> writes:
> On 8 Apr 2023, at 18:23, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Can't we write "use IPC::Run 0.98;" and let
>> some other code manage the version comparison?
> We can, but that AFAIK (Andrew might have a better answer) requires the below
> diff which I think leaves some readability to be desired:
> - (eval { require IO::Pty; } && eval { $IPC::Run::VERSION >= '0.98' });
> + (eval { require IO::Pty; } && !!eval { IPC::Run->VERSION('0.98'); 1 });
Maybe I'm missing something, but I was envisioning
eval { require IO::Pty; use IPC::Run 0.98; }
with no need to do more than check if the eval traps an error.
regards, tom lane
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: tgl@sss.pgh.pa.us, daniel@yesql.se, andrew@dunslane.net, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Skip \password TAP test on old IPC::Run versions
In-Reply-To: <3618405.1680985800@sss.pgh.pa.us>
* 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