aboutsummaryrefslogtreecommitdiff
path: root/src/test/perl/PostgreSQL/Test/Cluster.pm
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2022-03-31 14:10:47 -0400
committerAndrew Dunstan <andrew@dunslane.net>2022-03-31 14:10:47 -0400
commitd5f43a1a10f688e2437ffb7d454d0a2d57308bff (patch)
tree611115748e1c746a759f6113d2ce561e577a3cec /src/test/perl/PostgreSQL/Test/Cluster.pm
parentfea1cc49e4abca7eeb9bb9dd02d7d78abbd8d045 (diff)
downloadpostgresql-d5f43a1a10f688e2437ffb7d454d0a2d57308bff.tar.gz
postgresql-d5f43a1a10f688e2437ffb7d454d0a2d57308bff.zip
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/474104.1648685981@sss.pgh.pa.us
Diffstat (limited to 'src/test/perl/PostgreSQL/Test/Cluster.pm')
-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 1cbf90c0536..b4ebc999356 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