perl-new-namespace-backport-2.patch

text/x-patch

Filename: perl-new-namespace-backport-2.patch
Type: text/x-patch
Part: 2
Message: Re: Postgres perl module namespace

Patch

Format: unified
File+
src/test/perl/PostgreSQL/Test/Cluster.pm 16 0
src/test/perl/PostgreSQL/Test/Utils.pl 14 0
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
new file mode 100644
index 0000000000..1e2fb50d6d
--- /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;
+
diff --git a/src/test/perl/PostgreSQL/Test/Utils.pl b/src/test/perl/PostgreSQL/Test/Utils.pl
new file mode 100644
index 0000000000..752ce38a74
--- /dev/null
+++ b/src/test/perl/PostgreSQL/Test/Utils.pl
@@ -0,0 +1,14 @@
+# Copyright (c) 2022, PostgreSQL Global Development Group
+
+# allow use of release 15+ perl namespace in older branches
+# just 'use' the older module name.
+# See TestLib.pm for alias assignment
+
+package PostgreSQL::Test::Utils;
+
+use strict;
+use warnings;
+
+use TestLib;
+
+1;