Re: Postgres perl module namespace

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: Postgres perl module namespace
Дата
Msg-id 20220622072144.GD4167527@rfd.leadboat.com
обсуждение исходный текст
Ответ на Re: Postgres perl module namespace  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Postgres perl module namespace  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On Tue, Apr 19, 2022 at 07:24:58PM -0400, Andrew Dunstan wrote:
> On 2022-04-19 Tu 18:39, Michael Paquier wrote:
> > +*generate_ascii_string = *TestLib::generate_ascii_string;
> > +*slurp_dir = *TestLib::slurp_dir;
> > +*slurp_file = *TestLib::slurp_file;
> >
> > I am not sure if it is possible and my perl-fu is limited in this
> > area, but could a failure be enforced when loading this path if a new
> > routine added in TestLib.pm is forgotten in this list?
> 
> Not very easily that I'm aware of, but maybe some superior perl wizard
> will know better.

One can alias the symbol table, like https://metacpan.org/pod/Package::Alias
does.  I'm attaching what I plan to use.  Today, check-world fails after

  sed -i 's/TestLib/PostgreSQL::Test::Utils/g; s/PostgresNode/PostgreSQL::Test::Cluster/g' **/*.pl

on REL_14_STABLE, because today's alias list is incomplete.  With this change,
the same check-world passes.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: pg_page_repair: a tool/extension to repair corrupted pages in postgres with streaming/physical replication
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: New Object Access Type hooks