From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Extend compatibility of PostgreSQL::Test::Cluster |
Date: | 2021-12-31 16:22:49 |
Message-ID: | d15f6d95-4a0d-a959-c186-edc636e392b2@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12/31/21 11:20, Dagfinn Ilmari Mannsåker wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Pryzby | 2021-12-31 16:32:27 | Re: Column Filtering in Logical Replication |
Previous Message | Dagfinn Ilmari Mannsåker | 2021-12-31 16:20:03 | Re: Extend compatibility of PostgreSQL::Test::Cluster |