Re: pgsql: Fix perltidy breaking perlcritic

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
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-14 02:05:20
Message-ID: cd7c9d7d-53bf-1a8f-669a-4c5ec6c601e6@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers


On 2022-09-13 Tu 05:25, John Naylor wrote:
> On Mon, Sep 12, 2022 at 4:54 PM Dagfinn Ilmari Mannsåker
> <ilmari(at)ilmari(dot)org> wrote:
>
>>> eval "\$hash_ref = $_"; ## no critic (ProhibitStringyEval)
>> I didn't see this until it got committed, since I'm not subscribed to
>> -committers, but I think it would be even better to rely on the fact
>> that eval returns the value of the last expression in the string, which
>> also gets rid of the ugly quoting and escaping, per the attached.
> Hmm, interesting.

I agree it's a slight stylistic improvement. I was trying to keep as
close as possible to the original.

cheers

andrew

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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2022-09-14 02:39:32 Re: pgsql: aix: No need to use mkldexport when we want to export all symbol
Previous Message Andres Freund 2022-09-13 18:25:30 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 Kyotaro Horiguchi 2022-09-14 02:15:07 A question about wording in messages
Previous Message Ranier Vilela 2022-09-14 00:34:51 Re: Fix possible bogus array out of bonds (src/backend/access/brin/brin_minmax_multi.c)