public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andrew Dunstan <[email protected]>
To: Dagfinn Ilmari Mannsåker <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Extend compatibility of PostgreSQL::Test::Cluster
Date: Fri, 31 Dec 2021 11:22:49 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
On 12/31/21 11:20, Dagfinn Ilmari Mannsåker wrote:
> Andrew Dunstan <[email protected]> writes:
>
>> + my $subclass = __PACKAGE__ . "::V_$maj";
>> + bless $node, $subclass;
>> + unless ($node->isa(__PACKAGE__))
>> + {
>> + # It's not a subclass, so re-bless back into the main package
>> + bless($node, __PACKAGE__);
>> + carp "PostgreSQL::Test::Cluster isn't fully compatible with version $ver";
>> + }
> The ->isa() method works on package names as well as blessed objects, so
> the back-and-forth blessing can be avoided.
>
> my $subclass = __PACKAGE__ . "::V_$maj";
> if ($subclass->isa(__PACKAGE__))
> {
> bless($node, $subclass);
> }
> else
> {
> carp "PostgreSQL::Test::Cluster isn't fully compatible with version $ver";
> }
>
OK, thanks, will fix in next version.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
view thread (9+ messages) latest in thread
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Extend compatibility of PostgreSQL::Test::Cluster
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox