From f62ed5c68c90d9eb49d77a81994b86c5b6d61166 Mon Sep 17 00:00:00 2001
From: Andrew Dunstan <andrew@dunslane.net>
Date: Tue, 19 Oct 2021 14:50:57 -0400
Subject: [PATCH 2/2] move PostgreSQL::Test::PostgresVersion up in the
 namespace so PostgreSQL::Version

---
 src/test/perl/PostgreSQL/Test/Cluster.pm       |  4 ++--
 .../{Test/PostgresVersion.pm => Version.pm}    | 18 +++++++++---------
 2 files changed, 11 insertions(+), 11 deletions(-)
 rename src/test/perl/PostgreSQL/{Test/PostgresVersion.pm => Version.pm} (83%)

diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index f6e6c41df3..4b7671dacc 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -100,7 +100,7 @@ use File::Spec;
 use File::stat qw(stat);
 use File::Temp ();
 use IPC::Run;
-use PostgreSQL::Test::PostgresVersion;
+use PostgreSQL::Version;
 use PostgreSQL::Test::RecursiveCopy;
 use Socket;
 use Test::More;
@@ -1286,7 +1286,7 @@ sub _set_pg_version
 	my $version_line = qx{$pg_config --version};
 	BAIL_OUT("$pg_config failed: $!") if $?;
 
-	$self->{_pg_version} = PostgreSQL::Test::PostgresVersion->new($version_line);
+	$self->{_pg_version} = PostgreSQL::Version->new($version_line);
 
 	BAIL_OUT("could not parse pg_config --version output: $version_line")
 	  unless defined $self->{_pg_version};
diff --git a/src/test/perl/PostgreSQL/Test/PostgresVersion.pm b/src/test/perl/PostgreSQL/Version.pm
similarity index 83%
rename from src/test/perl/PostgreSQL/Test/PostgresVersion.pm
rename to src/test/perl/PostgreSQL/Version.pm
index 9b1bce4758..71ca7a0a83 100644
--- a/src/test/perl/PostgreSQL/Test/PostgresVersion.pm
+++ b/src/test/perl/PostgreSQL/Version.pm
@@ -1,6 +1,6 @@
 ############################################################################
 #
-# PostgreSQL::Test::PostgresVersion.pm
+# PostgreSQL::Version.pm
 #
 # Module encapsulating Postgres Version numbers
 #
@@ -12,13 +12,13 @@
 
 =head1 NAME
 
-PostgreSQL::Test::PostgresVersion - class representing PostgreSQL version numbers
+PostgreSQL::Version - class representing PostgreSQL version numbers
 
 =head1 SYNOPSIS
 
-  use PostgreSQL::Test::PostgresVersion;
+  use PostgreSQL::Version;
 
-  my $version = PostgreSQL::Test::PostgresVersion->new($version_arg);
+  my $version = PostgreSQL::Version->new($version_arg);
 
   # compare two versions
   my $bool = $version1 <= $version2;
@@ -37,12 +37,12 @@ PostgreSQL::Test::PostgresVersion - class representing PostgreSQL version number
 
 =head1 DESCRIPTION
 
-PostgreSQL::Test::PostgresVersion encapsulates Postgres version numbers, providing parsing
+PostgreSQL::Version encapsulates Postgres version numbers, providing parsing
 of common version formats and comparison operations.
 
 =cut
 
-package PostgreSQL::Test::PostgresVersion;
+package PostgreSQL::Version;
 
 use strict;
 use warnings;
@@ -60,9 +60,9 @@ use overload
 
 =over
 
-=item PostgreSQL::Test::PostgresVersion->new($version)
+=item PostgreSQL::Version->new($version)
 
-Create a new PostgreSQL::Test::PostgresVersion instance.
+Create a new PostgreSQL::Version instance.
 
 The argument can be a number like 12, or a string like '12.2' or the output
 of a Postgres command like `psql --version` or `pg_config --version`;
@@ -103,7 +103,7 @@ sub new
 
 # Routine which compares the _pg_version_array obtained for the two
 # arguments and returns -1, 0, or 1, allowing comparison between two
-# PostgreSQL::Test::PostgresVersion objects or a PostgreSQL::Test::PostgresVersion and a version string or number.
+# PostgreSQL::Version objects or a PostgreSQL::Version and a version string or number.
 #
 # If the second argument is not a blessed object we call the constructor
 # to make one.
-- 
2.25.4

