aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2022-06-25 14:15:56 -0700
committerNoah Misch <noah@leadboat.com>2022-06-25 14:15:56 -0700
commit4b0d21b06c6b0f3b0fec0d069759f4b82913e452 (patch)
tree54c61b0a55968c733ee269169616fce05aff4d3f
parentace9973867c2f17ed6191a4a3b9a46939a2df45b (diff)
downloadpostgresql-4b0d21b06c6b0f3b0fec0d069759f4b82913e452.tar.gz
postgresql-4b0d21b06c6b0f3b0fec0d069759f4b82913e452.zip
Fix PostgreSQL::Test aliasing for Perl v5.10.1.
This Perl segfaults if a declaration of the to-be-aliased package precedes the aliasing itself. Per buildfarm members lapwing and wrasse. Like commit 20911775de4ab7ac3ecc68bd714cb3ed0fd68b6a, back-patch to v10 (all supported versions). Discussion: https://postgr.es/m/20220625171533.GA2012493@rfd.leadboat.com
-rw-r--r--src/test/perl/PostgreSQL/Test/Cluster.pm7
-rw-r--r--src/test/perl/PostgreSQL/Test/Utils.pm7
2 files changed, 2 insertions, 12 deletions
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index 14b8ee73776..14e9138a394 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -5,14 +5,9 @@
# package the same symbol table as the older package. See PostgresNode::new
# for supporting heuristics.
-package PostgreSQL::Test::Cluster;
-
use strict;
use warnings;
-
-use PostgresNode;
BEGIN { *PostgreSQL::Test::Cluster:: = \*PostgresNode::; }
-
-use Exporter 'import';
+use PostgresNode ();
1;
diff --git a/src/test/perl/PostgreSQL/Test/Utils.pm b/src/test/perl/PostgreSQL/Test/Utils.pm
index e743bdfc834..2d15bbf21d7 100644
--- a/src/test/perl/PostgreSQL/Test/Utils.pm
+++ b/src/test/perl/PostgreSQL/Test/Utils.pm
@@ -3,14 +3,9 @@
# Allow use of release 15+ Perl package name in older branches, by giving that
# package the same symbol table as the older package.
-package PostgreSQL::Test::Utils;
-
use strict;
use warnings;
-
-use TestLib;
BEGIN { *PostgreSQL::Test::Utils:: = \*TestLib::; }
-
-use Exporter 'import';
+use TestLib ();
1;