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 1odF4h-0006pf-R3 for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Sep 2022 18:12:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1odF4g-00007G-C8 for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Sep 2022 18:12:54 +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 1odF4e-000074-JW for pgsql-hackers@lists.postgresql.org; Tue, 27 Sep 2022 18:12:54 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1odF4Z-0007g1-7A for pgsql-hackers@lists.postgresql.org; Tue, 27 Sep 2022 18:12:52 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 3E5303200893; Tue, 27 Sep 2022 14:12:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 27 Sep 2022 14:12:43 -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=1664302362; x=1664388762; bh=JdjeEoghhK rtn5FFlrNaEFj3+IdpR34tPGf8oNtNfsY=; b=yoS4mIiFJ1OkXOjm0vJcvhVaDx XD1pfX/kLbUHDytb0t68/+7507fZNTOvyvqyem5JYfDl4xztrB0hndjHQ2f+YTqv CMlfKtlaJ7BV+q9Wth67O84AMd35LZ/b5+Bal5bOyczmEmLcpJrguErjcrNa5pus f1Z5K4UPMOX+V8+sJV1C07j3jrU5Aq2blliFnNrr2aqEsAbe+B29drQAsqGu3L/J 1cczb+8dgHv/Wnj63b0V4NBpT/1wdrz/WNa5+qbrxznrECNlCXJ6LBIFAT2g0L3d veV6SMm/Hf/vQqQ9249rliQV/feEkGjKVvh/lyFLGgliX0yM0r8bW87f+R3w== 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=1664302362; x=1664388762; bh=JdjeEoghhKrtn5FFlrNaEFj3+Idp R34tPGf8oNtNfsY=; b=qB5p27fNzBa9Oc0+L6S4HxZKoSE39Rjz/CXC7YJ1g7To LjRCpjiz0K9GOCOPSx11g/k2jvrWCwpgCHPuOSvGnGpruf9V3fxPJ9hWkeYgWqne eyt3LNOyYakfUxPhItLiNlqCJwmg1sCmLuKg5xu08nR7JHMDqMmq0IWIZimct/wm x9neqGVjBcqIF0rt1MEBae887HXJe/hxzNNL5+gsamM3iNQzGS/HFepoDyj+x1mu ynoc+oUR1VOZwwRSA6947XWr3PgayghV5JqcGWAvGJgwpD8TibmTC6uuE5uyV4nH eR6rmWGVe8vz5NIquz/7lA9c16asjuYRAw8ewXDIqw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeegiedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujgfffhgfkfggtgesmhdtreertderjeenucfhrhhomhepffgrghhf ihhnnhcukfhlmhgrrhhiucforghnnhhsnohkvghruceoihhlmhgrrhhisehilhhmrghrih drohhrgheqnecuggftrfgrthhtvghrnhepkeelfeegkeelfeeiheffhedugfffffejueev geetvddtjeeugfeugeegvefflefhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepihhlmhgrrhhisehilhhmrghrihdrohhrgh X-ME-Proxy: Feedback-ID: i1ff147bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 27 Sep 2022 14:12:41 -0400 (EDT) From: Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= To: Andrew Dunstan Cc: John Naylor , Alvaro Herrera , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Fix perltidy breaking perlcritic In-Reply-To: (Andrew Dunstan's message of "Sat, 10 Sep 2022 02:50:09 -0400") Date: Mon, 12 Sep 2022 10:54:47 +0100 References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Message-ID: <87edvwlm93.fsf@wibble.ilmari.org> 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 Content-Disposition: inline [resending to -hackers instead of -committers] 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