Re: Cleaning up perl code

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, Michael Paquier <michael@paquier.xyz>
Cc: Alexander Lakhin <exclusion@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-07-02T15:11:22Z
Lists: pgsql-hackers
On 2024-07-02 Tu 8:55 AM, Dagfinn Ilmari Mannsåker wrote:
> Relatedly, I also had a look at prohibiting unused regex captures
> (RegularExpressions::ProhibitUnusedCapture), which found a few real
> cases, but also lots of false positives in Catalog.pm, because it
> doesn't understand that %+ uses all named captures, so I won't propose a
> patch for that until that's fixed upstream
> (https://github.com/Perl-Critic/Perl-Critic/pull/1065).
>

We could mark Catalog.pm with a "## no critic (ProhibitUnusedCapture)" 
and then use the test elsewhere.

cheers

andrew

--
Andrew Dunstan
EDB:https://www.enterprisedb.com

Commits

  1. Clean up more unused variables in perl code

  2. Cleanup perl code from unused variables and routines

  3. Fix comment in 024_add_drop_pub.pl