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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Mike Blackwell <maiku41(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Clear up perlcritic 'missing return' warning
Date: 2018-05-22 08:32:11
Message-ID: 20180522083211.GB12027@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-05-22 08:33:12 Re: Time to put context diffs in the grave
Previous Message Michael Paquier 2018-05-22 08:22:19 Re: SCRAM with channel binding downgrade attack