Re: [PATCH] Clear up perlcritic 'missing return' warning

Поиск
Список
Период
Сортировка
Искать
От
Michael Paquier
Тема
Re: [PATCH] Clear up perlcritic 'missing return' warning
Дата
в 11:32:11
Msg-id
20180522083211.GB12027@paquier.xyz
Ответ на
Список
Дерево обсуждения
[PATCH] Clear up perlcritic 'missing return' warning Mike Blackwell <maiku41@gmail.com>
Re: [PATCH] Clear up perlcritic 'missing return' warning Michael Paquier <michael@paquier.xyz>
Re: [PATCH] Clear up perlcritic 'missing return' warning Mike Blackwell <maiku41@gmail.com>
Re: [PATCH] Clear up perlcritic 'missing return' warning Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [PATCH] Clear up perlcritic 'missing return' warning Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [PATCH] Clear up perlcritic 'missing return' warning Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [PATCH] Clear up perlcritic 'missing return' warning Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [PATCH] Clear up perlcritic 'missing return' warning Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [PATCH] Clear up perlcritic 'missing return' warning Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
On Mon, May 21, 2018 at 08:07:03PM -0500, Mike Blackwell wrote:
> This particular patch addresses the warning caused by falling off the end
> of a subroutine rather than explicitly returning.

Do we really want to make that a requirement?  Making sure that there is
a return clause if a subroutine returns a result makes sense to me, but
making it mandatory if the subroutine does not return anything and
callers don't expect it do is not really a gain in my opinion.  And this
maps with any C code.

Just today, I coded a perl subroutine which does not return any
results...  This is most likely going to be forgotten.
--
Michael
В списке pgsql-hackers по дате отправления
От: Michael Paquier
Дата:
От: Michael Paquier
Дата:
FAQ