Re: Cleaning up perl code

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Cleaning up perl code
Дата
Msg-id ZkwyHO914XgrGRrd@paquier.xyz
обсуждение исходный текст
Ответ на Re: Cleaning up perl code  (Alexander Lakhin <exclusion@gmail.com>)
Ответы Re: Cleaning up perl code
Список pgsql-hackers
On Tue, May 21, 2024 at 06:00:00AM +0300, Alexander Lakhin wrote:
> I reviewed my collection of unica I gathered for several months, but had
> found some of them too minor/requiring more analysis.
> Then I added more with perlcritic's policy UnusedVariables, and also
> checked for unused subs with a script from blogs.perl.org (and it confirmed
> my only previous find of that kind).

Nice catches from both of you.  The two ones in
generate-wait_event_types.pl are caused by me, actually.

Not sure about the changes in the errcodes scripts, though.  The
current state of thing can be also useful when it comes to debugging
the parsing, and it does not hurt to keep the parsing rules the same
across the board.

>> The scripts parsing errcodes.txt really should be refactored into using
>> a common module, but that's a patch for another day.
>
> Agree, and I would leave 005_negotiate_encryption.pl (with $node_conf,
> $server_config unused since d39a49c1e) aside for another day too.

I'm not sure about these ones as each one of these scripts have their
own local tweaks.  Now, if there is a cleaner picture with a .pm
module I don't see while reading the whole, why not as long as it
improves the code.
--
Michael

Вложения

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

Предыдущее
От: Peter Smith
Дата:
Сообщение: Re: inconsistent quoting in error messages
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Speed up clean meson builds by ~25%