summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan2022-03-31 18:10:47 +0000
committerAndrew Dunstan2022-03-31 18:10:47 +0000
commitd5f43a1a10f688e2437ffb7d454d0a2d57308bff (patch)
tree611115748e1c746a759f6113d2ce561e577a3cec
parentfea1cc49e4abca7eeb9bb9dd02d7d78abbd8d045 (diff)
Remove use of perl parent module in Cluster.pm
Commit fb16d2c658 used the old but not quite old enough parent module, which dates to perl version 5.10.1 as a core module. We still have a dinosaur or two running older versions of perl, so rather than require an upgrade in those we simply do in place what parent.pm's import() would have done for us. Reviewed by Tom Lane Discussion: https://postgr.es/m/[email protected]
-rw-r--r--src/test/perl/PostgreSQL/Test/Cluster.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index 1cbf90c053..b4ebc99935 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -2918,7 +2918,10 @@ sub corrupt_page_checksum
package PostgreSQL::Test::Cluster::V_11; ## no critic (ProhibitMultiplePackages)
-use parent -norequire, qw(PostgreSQL::Test::Cluster);
+# parent.pm is not present in all perl versions before 5.10.1, so instead
+# do directly what it would do for this:
+# use parent -norequire, qw(PostgreSQL::Test::Cluster);
+push @PostgreSQL::Test::Cluster::V_11::ISA, 'PostgreSQL::Test::Cluster';
# https://www.postgresql.org/docs/11/release-11.html
@@ -2945,7 +2948,8 @@ sub init
package PostgreSQL::Test::Cluster::V_10; ## no critic (ProhibitMultiplePackages)
-use parent -norequire, qw(PostgreSQL::Test::Cluster::V_11);
+# use parent -norequire, qw(PostgreSQL::Test::Cluster::V_11);
+push @PostgreSQL::Test::Cluster::V_10::ISA, 'PostgreSQL::Test::Cluster::V_11';
# https://www.postgresql.org/docs/10/release-10.html