Re: Cleaning up perl code - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Cleaning up perl code
Date
Msg-id ZkwyHO914XgrGRrd@paquier.xyz
Whole thread Raw
In response to Re: Cleaning up perl code  (Alexander Lakhin <exclusion@gmail.com>)
Responses Re: Cleaning up perl code
List 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

Attachment

pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: inconsistent quoting in error messages
Next
From: Peter Eisentraut
Date:
Subject: Re: Speed up clean meson builds by ~25%