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 1paE44-0000ku-1t for pgsql-committers@arkaria.postgresql.org; Thu, 09 Mar 2023 11:04:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1paE43-0000sh-0L for pgsql-committers@arkaria.postgresql.org; Thu, 09 Mar 2023 11:04:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1paE41-0000sX-VD for pgsql-committers@lists.postgresql.org; Thu, 09 Mar 2023 11:04:02 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1paE3z-0004R7-CN for pgsql-committers@lists.postgresql.org; Thu, 09 Mar 2023 11:04:01 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A56455C0074; Thu, 9 Mar 2023 06:03:58 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 09 Mar 2023 06:03:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1678359838; x= 1678446238; bh=pOMGl826bmNNJNLJmm1idboTi2lQa2UzhTdlsqpAu4c=; b=W Kirhe3YagpB1bKC1Z89Y0Sp2AUHgNorQ5I5HC4Mdp6hCXxI7a8zVGVk5LqRE1MxM 7iR89q08XoanH5fFNTlIWxPJ5+to5TB4Lo3TXOfdlrnaJD8965VePVcyzSf9FyMC Tcwk7uTlszV+HtPvENW2k6Ehwd2sPp9eRlZ7Jdu2Enku1cNWogmrNTi1ZvTnXyPz +agydj7agA09dEbBjVE3GiCkuZMIekFb/e3P6ApE7xlnKrLLgoyg2Z9zSLkZMItd EP4Vj2DVOQ1r6RLyNwI/bSa9Pl4E1s5hM/VQH4APTn1vBy24PMP/GufNgsVrdvjH MlB0ZViPb+AD4pCwQJroA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdduiedgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 9 Mar 2023 06:03:58 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 033FC9C; Thu, 9 Mar 2023 12:03:56 +0100 (CET) Date: Thu, 9 Mar 2023 12:03:56 +0100 From: Alvaro Herrera To: Andrew Dunstan Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: 001_libpq_pipeline.pl: use Test::Differences if available Message-ID: <20230309110356.h6muf4xjem3ylidd@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230309094502.heamw6al2vkjr4yw@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Mar-09, Alvaro Herrera wrote: > On 2023-Mar-08, Andrew Dunstan wrote: > > > something like this should do the trick: > > > > > >    eval { require Test::Differences; Test::Differences->import; > > unified_diff; 1; }; > > > >    *eq_or_diff = \&is if $@; > > Hmm, I just grabbed the code from the Test::Differences manual, but I > agree that avoiding the stringy eval is better. Let me try it out. It seemed to work fine for me, so pushed. Thanks for the suggestion. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/