Re: pgsql: 001_libpq_pipeline.pl: use Test::Differences if available - Mailing list pgsql-committers

From Alvaro Herrera
Subject Re: pgsql: 001_libpq_pipeline.pl: use Test::Differences if available
Date
Msg-id 20230309110356.h6muf4xjem3ylidd@alvherre.pgsql
Whole thread Raw
In response to Re: pgsql: 001_libpq_pipeline.pl: use Test::Differences if available  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-committers
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/



pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Avoid criticizable perl code
Next
From: Stephen Frost
Date:
Subject: pgsql: For Kerberos testing, disable reverse DNS lookup