Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plBN2-00052R-Lb for pgsql-committers@arkaria.postgresql.org; Sat, 08 Apr 2023 16:24:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1plBM3-0000pw-FK for pgsql-committers@arkaria.postgresql.org; Sat, 08 Apr 2023 16:23:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plBM3-0000pn-8H for pgsql-committers@lists.postgresql.org; Sat, 08 Apr 2023 16:23:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1plBM0-001fLG-LE; Sat, 08 Apr 2023 16:23:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 338GNnbb3588536; Sat, 8 Apr 2023 12:23:49 -0400 From: Tom Lane To: Andrew Dunstan cc: Daniel Gustafsson , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Skip \password TAP test on old IPC::Run versions In-reply-to: <6d880ea2-f8ca-f458-4dcd-a7a3e6d6cd7c@dunslane.net> References: <6d880ea2-f8ca-f458-4dcd-a7a3e6d6cd7c@dunslane.net> Comments: In-reply-to Andrew Dunstan message dated "Sat, 08 Apr 2023 11:46:23 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3588534.1680971029.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Sat, 08 Apr 2023 12:23:49 -0400 Message-ID: <3588535.1680971029@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Dunstan 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