Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix PostgreSQL::Test aliasing for Perl v5.10.1.
authorNoah Misch <noah@leadboat.com>
Sat, 25 Jun 2022 21:15:56 +0000 (14:15 -0700)
committerNoah Misch <noah@leadboat.com>
Sat, 25 Jun 2022 21:16:00 +0000 (14:16 -0700)
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

src/test/perl/PostgreSQL/Test/Cluster.pm
src/test/perl/PostgreSQL/Test/Utils.pm

index 14b8ee737764d5fd6c62ce8cfbc1e548d53d223f..14e9138a394fd382a389c98a7e9ec657aa6200fd 100644 (file)
@@ -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;
index e743bdfc834ea1474a99817e9d339f51563debb1..2d15bbf21d7e06867148ceffce2849e67daba7ce 100644 (file)
@@ -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;