Re: pgsql: Fix perltidy breaking perlcritic

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix perltidy breaking perlcritic
Date: 2022-09-10 06:50:09
Message-ID: CAD5tBc+zRhuWn_S4ayH2sWKe60FQu1guTTokDFS3YMOeSrsozA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Fri, Sep 9, 2022 at 10:44 PM John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
wrote:

> On Fri, Sep 9, 2022 at 3:32 AM Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
> > A better way do do this IMNSHO is to put the eval in a block on its own
> along with the no critic marker on its own line, like this:
> >
> > {
> > ## no critic (ProhibitStringyEval)
> > eval ...
> > }
> >
> > perlcritic respects block boundaries for its directives.
>
> I tried that in the attached -- it looks a bit nicer but requires more
> explanation. I don't have strong feelings either way.
>
>
Maybe even better would be just this, which I bet perltidy would not monkey
with, and would require no explanation:

eval "\$hash_ref = $_"; ## no critic (ProhibitStringyEval)

cheers

andrew

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2022-09-10 07:58:27 pgsql: Free correctly LDAPMessage returned by ldap_search_s() in auth.c
Previous Message Andres Freund 2022-09-10 05:57:36 Re: pgsql: aix: No need to use mkldexport when we want to export all symbol

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-09-10 08:23:26 Re: [PATCH] Tab completion for SET COMPRESSION
Previous Message Justin Pryzby 2022-09-10 05:44:40 Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)