Re: pgsql: Make PostgreSQL::Test::Cluster compatible with all live branches

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Make PostgreSQL::Test::Cluster compatible with all live branches
Date: 2022-03-31 10:09:34
Message-ID: 230c42b8-5758-3616-b4fd-df9191f0c273@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers


On 3/30/22 21:12, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>> On Mar 30, 2022, at 8:19 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> I think this means that its old Perl version misinterprets
>>> use parent -norequire, qw(PostgreSQL::Test::Cluster);
>>> as a request to include "parent.pm". Is there a more
>>> backwards-compatible way to spell that?
>> Not that I know of. Googling tells me it was a core module from 5.10.1. I can revert tomorrow if necessary :-(

I must have been half asleep when I posted this.

There are three ways out of this that I can see:

. carry a copy of parent.pm in src/test/perl (It's very small)

. use the older and heavier 'base' module which goes back to 5.004, and
does much the same thing (and a lot more)

. just do directly what parent.pm's import() does, as in the attached,
which I have tested down to version 10.

On the whole I think I prefer the last.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachment Content-Type Size
cluster-parent-fix.patch text/x-patch 1.1 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2022-03-31 10:12:34 pgsql: doc: Fix typo in ANALYZE documentation
Previous Message Daniel Gustafsson 2022-03-31 09:26:04 pgsql: Add diagnostic output on error in pump_until