Re: pgsql: Fix perltidy breaking perlcritic

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: pgsql: Fix perltidy breaking perlcritic
Дата
Msg-id CAD5tBc+zRhuWn_S4ayH2sWKe60FQu1guTTokDFS3YMOeSrsozA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Fix perltidy breaking perlcritic  (John Naylor <john.naylor@enterprisedb.com>)
Список pgsql-committers


On Fri, Sep 9, 2022 at 10:44 PM John Naylor <john.naylor@enterprisedb.com> wrote:
On Fri, Sep 9, 2022 at 3:32 AM Andrew Dunstan <andrew@dunslane.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

В списке pgsql-committers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: aix: No need to use mkldexport when we want to export all symbol
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Free correctly LDAPMessage returned by ldap_search_s() in auth.c