Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1spvg3-005YGM-7f for pgsql-committers@arkaria.postgresql.org; Sun, 15 Sep 2024 20:17:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1spvg1-005Y6p-Rk for pgsql-committers@arkaria.postgresql.org; Sun, 15 Sep 2024 20:16:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1spvg1-005Y6e-JF for pgsql-committers@lists.postgresql.org; Sun, 15 Sep 2024 20:16:57 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1spvfy-001KqJ-Fg for pgsql-committers@lists.postgresql.org; Sun, 15 Sep 2024 20:16:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2024011501; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=K2RAsugcMOXaFpZ0bgnhjN5Ptj2etaB5uKQ5jQtqTDk=; b=j2bnp 4NToe4zKIqYDPvr2sn2EQoIP2erhJiwVoay8doBUDhH2h2VDNdqbSt/Qhd9lbYnCa7aETnq6XxZoW BnCVMobuaO/BNEea2s7eAWw1Nr0XrjB7eAewwtz+dbWvLc6hQ2oSfD2mCvRdCh2vh3chVnrdF/pyP xf5oMhk2GfaPPVkdtl8IT7IU2W0b6Kxt/t1TghnoIWVY21qBTs8qAy8KOLNWNHvOHX/MG8S76ADUJ rf9I/9CFkzoRMffPTA1qEE3OfSyH8HphYUsoQ1Tj1jkao34egWwiOZhy37rTXhHNhMzkliiIsEu4B ukS5idr51jvORGEfwD3440bRyZJpg==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1spvfw-00DL32-2E; Sun, 15 Sep 2024 16:16:52 -0400 Date: Sun, 15 Sep 2024 16:16:52 -0400 From: Bruce Momjian To: Andrew Dunstan Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Perl scripts: eliminate "Useless interpolation" warnings Message-ID: References: <66b5b1d6-3f2a-4944-91a3-7e40a565ccac@dunslane.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <66b5b1d6-3f2a-4944-91a3-7e40a565ccac@dunslane.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Sep 15, 2024 at 02:30:47PM -0400, Andrew Dunstan wrote: > > > On 2024-09-15 Su 10:56 AM, Bruce Momjian wrote: > > Perl scripts: eliminate "Useless interpolation" warnings > > Eliminate warnings of Perl Critic from src/tools. > > Backpatch-through: master > > > > I don't understand this commit. The buildfarm members crake and koel regularly > run the perl critic checks and have not complained. See for example from before > this change: koel&dt=2024-09-15%2003%3A34%3A02&stg=perl-check> > > The change doesn't seem to have had any discussion either. This particular > warning is surely a very low level (i.e. fairly unimportant) one, of the type > we normally ignore. If some version of perlcritic has raised it to severity 5 > then the correct action IMNSHO would be to add an exception for it to the > perlcriticrc, like we do for ProhibitLeadingZeros. If not, then perhaps you can > explain how you got the warnings. So, the warning is about the use of double-quotes when single-quotes will work just fine. I wrote a new script and changed it to single quotes, so for consistency, I looked at other Perl scripts that might have the issue. The message I got was: /root/add_commit_links.pl: Useless interpolation of literal string at line 51 near 'my $tmpfile = $file . ".tmp";'. (Severity: 1) My $HOME/.perlcritic has: severity = 1 and that is why I saw it. Is it a bad change? -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com When a patient asks the doctor, "Am I going to die?", he means "Am I going to die soon?"