summaryrefslogtreecommitdiff
path: root/src/test/perl/PostgreSQL/Test/Cluster.pm
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2022-04-21 09:38:20 -0400
committerAndrew Dunstan <andrew@dunslane.net>2022-04-21 09:38:20 -0400
commit5d223e4e0691911d1addbacbb6d843ac5c8af53a (patch)
tree6442cf05165e4a41527975a20eb91de5ef16a590 /src/test/perl/PostgreSQL/Test/Cluster.pm
parenta903895b3fe49c4ceb6fbcea73e357493245771d (diff)
Support new perl module namespace in stable branches
Commit b3b4d8e68a moved our perl test modules to a better namespace structure, but this has made life hard for people wishing to backpatch improvements in the TAP tests. Here we alleviate much of that difficulty by implementing the new module names on top of the old modules, mostly by using a little perl typeglob aliasing magic, so that we don't have a dual maintenance burden. This should work both for the case where a new test is backpatched and the case where a fix to an existing test that uses the new namespace is backpatched. Reviewed by Michael Paquier Per complaint from Andres Freund Discussion: https://postgr.es/m/20220418141530.nfxtkohefvwnzncl@alap3.anarazel.de Applied to branches 10 through 14
Diffstat (limited to 'src/test/perl/PostgreSQL/Test/Cluster.pm')
-rw-r--r--src/test/perl/PostgreSQL/Test/Cluster.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
new file mode 100644
index 00000000000..1e2fb50d6da
--- /dev/null
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -0,0 +1,16 @@
+
+# Copyright (c) 2022, PostgreSQL Global Development Group
+
+# allow use of release 15+ perl namespace in older branches
+# just 'use' the older module name.
+# See PostgresNode.pm for function implementations
+
+package PostgreSQL::Test::Cluster;
+
+use strict;
+use warnings;
+
+use PostgresNode;
+
+1;
+