From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: 001_libpq_pipeline.pl: use Test::Differences if available
Date: Thu, 9 Mar 2023 12:03:56 +0100
Message-ID: <20230309110356.h6muf4xjem3ylidd@alvherre.pgsql> (raw)
In-Reply-To: <20230309094502.heamw6al2vkjr4yw@alvherre.pgsql>
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/
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org, andrew@dunslane.net
Subject: Re: pgsql: 001_libpq_pipeline.pl: use Test::Differences if available
In-Reply-To: <20230309110356.h6muf4xjem3ylidd@alvherre.pgsql>
References: <20230309094502.heamw6al2vkjr4yw@alvherre.pgsql> <20230309110356.h6muf4xjem3ylidd@alvherre.pgsql>
* 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