Re: pgsql: Fix perltidy breaking perlcritic

John Naylor <john.naylor@enterprisedb.com>

From: John Naylor <john.naylor@enterprisedb.com>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: Andrew Dunstan <andrew@dunslane.net>, Alvaro Herrera <alvherre@alvh.no-ip.org>, pgsql-committers@lists.postgresql.org
Date: 2022-09-13T09:25:18Z
Lists: pgsql-hackers
On Mon, Sep 12, 2022 at 4:54 PM Dagfinn Ilmari Mannsåker
<ilmari@ilmari.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.
-- 
John Naylor
EDB: http://www.enterprisedb.com



Commits

  1. Make eval statement naturally proof against perltidy

  2. Fix perltidy breaking perlcritic