Re: Postgres perl module namespace
Noah Misch <noah@leadboat.com>
From: Noah Misch <noah@leadboat.com>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Michael Paquier <michael@paquier.xyz>, Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Mark Dilger <mark.dilger@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-09-08T04:00:11Z
Lists: pgsql-hackers
On Tue, Sep 07, 2021 at 07:43:47AM -0400, Andrew Dunstan wrote: > On 9/6/21 1:08 AM, Michael Paquier wrote: > > On Sat, Sep 04, 2021 at 09:58:08AM -0400, Andrew Dunstan wrote: > >> On 9/4/21 2:19 AM, Noah Misch wrote: > >>> plperl uses PostgreSQL:: as the first component of its Perl module namespace. > >>> We shouldn't use both PostgreSQL:: and Postgres:: in the same source tree, so > >>> this change should not use Postgres::. > >> Good point. Here's the same thing using PostgreSQL::Test > > A minor point: this introduces PostgreSQL::Test::PostgresVersion. > > Could be this stripped down to PostgreSQL::Test::Version instead? > > That name isn't very clear - what is it the version of, PostgreSQL or > the test? Fair. > There's nothing very test-specific about this module - it simply > encapsulates a Postgres version string. So maybe it should just be > PostgreSQL::Version. Could be fine, but that name could be useful as a CPAN module. These modules don't belong on CPAN, so I'd keep PostgreSQL::Test::PostgresVersion. There's only one reference in the tree, so optimizing that particular name is less exciting. (I wondered about using PGXS:: as the namespace for all these modules, since it's short and "pgxs" is the closest thing to a name for the PostgreSQL build system. Overall, I didn't convince myself about it being an improvement.)
Commits
-
Fix PostgreSQL::Test aliasing for Perl v5.10.1.
- fe25c8533c17 12.12 landed
- ca590a4e958f 10.22 landed
- bf92b73beb50 11.17 landed
- aa1845cdd697 13.8 landed
- 4b0d21b06c6b 14.5 landed
-
For PostgreSQL::Test compatibility, alias entire package symbol tables.
- 38790408b020 10.22 landed
- ec26f44d539a 12.12 landed
- e8f037a2df9b 13.8 landed
- c41edb324294 11.17 landed
- 20911775de4a 14.5 landed
-
Make PostgresNode easily subclassable
- 54dacc746628 10.0 cited