Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXg9e-0004l6-Uw for pgsql-committers@arkaria.postgresql.org; Mon, 12 Sep 2022 09:55:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oXg9d-00049c-Ja for pgsql-committers@arkaria.postgresql.org; Mon, 12 Sep 2022 09:55:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXg9b-00049T-TP for pgsql-committers@lists.postgresql.org; Mon, 12 Sep 2022 09:55:01 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXg9X-0006jo-Mm for pgsql-committers@lists.postgresql.org; Mon, 12 Sep 2022 09:54:59 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 0C8DD3200902; Mon, 12 Sep 2022 05:54:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 12 Sep 2022 05:54:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilmari.org; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1662976489; x=1663062889; bh=vwXs0U2asd Kt75Pxw6hLv9GaqHm1ohL1opZyFnKsBa8=; b=X6cIcdZGhtWtsPNMbXpAlO4HDA EjqcnFLtr1rm3h0442Mz260Tvr4XqH/B6a4zrLK4rSrsnSYhX7IyKduY9JkZQRv1 QRpwz6cvf4D/qXj3uchneaykiidFPcTqJwa4UIWLhtClU+iOvV7TkOlPk4g/cY08 6Vc4jw9Dq0LTJsBuJ0JqZuMDPgz1ARftC2niuV/TMUemOtr4WDnVSbOiC6E6SMmt NkWo6PUpNfJpUqoY6Ud+r2RGOp4EKmPZubt2lZtSgpAE8x2afq45N1NIkKOGwCDO 4Ca2ZN1R4I7K+39YzDroqzpT2CoUJHaNwx6wnL3s6f8dL2IgxynCsziN4wFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1662976489; x=1663062889; bh=vwXs0U2asdKt75Pxw6hLv9GaqHm1 ohL1opZyFnKsBa8=; b=hOFM9IYfC8r5Y887mWXjwb+5oHOT34ROTdweVwfWJxQs BDq1U8gGUC8Nh5BvRIHq0rFjkCi+fKwe9+cOLyXYot/uXGWyFYLoPN/pmK5OW3Ie a4BvHOOFikXjZ9KdOqOxU7PMiSoGt+oYJ0KHW6iCecf3zrUQ3wlbMp5ykjlo/4uM sUpvUErQjMATtxtFNtIp3zbQNaFxNKkpjqIVCyCVyo6kWU95ydsDPKySHfgaqqRb oRVu4xmoKkmkg7FvZY5sYFy2x96Wy99wgXsnRNILDzBq5bAYlr39Vx8ICkzPhngG W4xgNhnKd8QMi1wtFddMmmtzEHxMRxRl/iFGloIulA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeduvddgvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufhffjgfkfgggtgesmhdtreertderjeenucfhrhhomhepffgrghhf ihhnnhgpkfhlmhgrrhhipgforghnnhhsnohkvghruceoihhlmhgrrhhisehilhhmrghrih drohhrgheqnecuggftrfgrthhtvghrnhepuefgfeduuedtjeeuheetjeeukefhjedtveeh jeelhfdutedvieeltddvuedvuddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepihhlmhgrrhhisehilhhmrghrihdrohhrgh X-ME-Proxy: Feedback-ID: i1ff147bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 12 Sep 2022 05:54:48 -0400 (EDT) From: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= To: Andrew Dunstan Cc: John Naylor , Alvaro Herrera , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix perltidy breaking perlcritic References: Date: Mon, 12 Sep 2022 10:54:47 +0100 In-Reply-To: (Andrew Dunstan's message of "Sat, 10 Sep 2022 02:50:09 -0400") Message-ID: <8735cwncig.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-=-= Content-Type: text/plain Andrew Dunstan writes: > On Fri, Sep 9, 2022 at 10:44 PM John Naylor > wrote: > >> On Fri, Sep 9, 2022 at 3:32 AM Andrew Dunstan 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) 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. - ilmari --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Use-return-value-of-eval-instead-of-assigning-inside.patch