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 1pI49x-0005Ds-0O for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Jan 2023 08:51:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pI49v-0001HO-S0 for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Jan 2023 08:51:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pI49u-0001HE-E7 for pgsql-hackers@lists.postgresql.org; Wed, 18 Jan 2023 08:51:03 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pI49r-00054L-5I for pgsql-hackers@lists.postgresql.org; Wed, 18 Jan 2023 08:51:01 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id BD4755C00FF for ; Wed, 18 Jan 2023 03:50:56 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 18 Jan 2023 03:50:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t= 1674031856; x=1674118256; bh=LiL2nzrMxfu14WC0UD1AF/6SlWFfcHlJ8Ph xd/I5mNg=; b=kdDwE7gAGVouI74fPN59LjokIucrlhvTvRUvAq4/Q/eNodpdLvQ 7X+FWP03sQ4jcM8+f5yEKo7UmHBZ9/KqQVe5Gok9rcJvuY338rNljetTes5r6IMK Vv6W1UDcdWNZw7mB29WCFGxPkAy0oM86cwhrm1oz2FcL7RSSA5CNtXajjv62T3e8 N1EuoE/beOP4u1tOUnp37XP059D1vRu2YZJgqEeInILVXTfEu9B5uy63k7jh8cFF 5ZeiEQyPQCsNtbJ+VjFMGLXKa185/gnLAqr5nd0sA+jlkP+fBqU5zNqVq2IM5Y09 npqs+ZJw3WVyGblwUR6bAZf+Y7PzTd19dvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1674031856; x= 1674118256; bh=LiL2nzrMxfu14WC0UD1AF/6SlWFfcHlJ8Phxd/I5mNg=; b=j dcDRqkDVYY6zPYXmoTu+piPDS3/696QfiuZ7mwaYLX6TjRrw7uJdN1zP0sxakw4U QHoHj7b518LIVpY67fiyQnbsZtLSY9O2zC5baHC6sDrYz09tIhcbl+C+HzhtM0fU FF7r99GhTmvlPojwHA98p5q2B2lLiSTr2mywZka2bVsZ2vIMIyn5NqgrTRh/YyVo molDfJ3VZpnFcYKrTBlYZDTRnimoZoZ5OnDdYPGAdrYf9dbRuXkvFpuMy+Q5kK5y IsVEMyxug1k/NZ0+ysgFKPoQqXacIGm0MjmU6jvGl1IPzgNFirf9zbEyFHcbHC3O UeU2L4enRqEgH3kfxcXmA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddtjedguddvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfggtggusehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvddtffetgedthfeugfevvddtjefg uefggefgjefgvdehgfefveeikedtleekhffgnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 18 Jan 2023 03:50:55 -0500 (EST) Date: Wed, 18 Jan 2023 17:50:47 +0900 From: Michael Paquier To: Postgres hackers Subject: Issue with psql's create_help.pl under perlcritic Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="sTvi3iZnHrATJtTQ" Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --sTvi3iZnHrATJtTQ Content-Type: multipart/mixed; boundary="gUmwBvrLw6kHiZTz" Content-Disposition: inline --gUmwBvrLw6kHiZTz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, A recent system update of a Debian SID host has begun to show me this issue: ./src/bin/psql/create_help.pl: Bareword dir handle opened at line 47, column 1. See pages 202,204 of PBP. ([InputOutput::ProhibitBarewordDirHandles] Severity: 5) This issue gets fixed here as of the attached. Comments? -- Michael --gUmwBvrLw6kHiZTz Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="psql_perlcritic.patch" Content-Transfer-Encoding: quoted-printable diff --git a/src/bin/psql/create_help.pl b/src/bin/psql/create_help.pl index 2c5fed203e..1d5366db16 100644 --- a/src/bin/psql/create_help.pl +++ b/src/bin/psql/create_help.pl @@ -44,7 +44,7 @@ my $define =3D $hfilebasename; $define =3D~ tr/a-z/A-Z/; $define =3D~ s/\W/_/g; =20 -opendir(DIR, $docdir) +opendir(my $dh, $docdir) or die "$0: could not open documentation source dir '$docdir': $!\n"; open(my $hfile_handle, '>', "$outdir/$hfile") or die "$0: could not open output file '$hfile': $!\n"; @@ -103,7 +103,7 @@ my $maxlen =3D 0; =20 my %entries; =20 -foreach my $file (sort readdir DIR) +foreach my $file (sort readdir $dh) { my ($cmdid, @cmdnames, $cmddesc, $cmdsynopsis); $file =3D~ /\.sgml$/ or next; @@ -230,4 +230,4 @@ print $hfile_handle " close $cfile_handle; close $hfile_handle; close $depfile_handle if ($depfile); -closedir DIR; +closedir $dh; --gUmwBvrLw6kHiZTz-- --sTvi3iZnHrATJtTQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmPHsucACgkQnvQgOdby QH0RWQ/9E95j5ig/C21VOCy0i74rZ6Vt7/pNXeXiqZYakDDl2poI63E6+j0ft/rl bqrVCJpPIzvjgXlVrcXDqZpWr8B2asYlKSit2RHl7MUqB5ayFHWJ/m8csHp/DPNw lKWwRbtkvIAV22ChEQ+cfoaWBtI5MUqhNH1ta+qdmMHScms4DuS5QJzyIOIo5WEe tx0qiwL/TL/lHlGH69FghrcGNDWhS7b95kOJZM/I8hlaS6rfi/C5D6RENDys5pF/ ghv5CnadJexkULnt2ehgDT2JvT7ny4xBItzvSKrsRO96v/gtayeqdY6Dy0XT0+Pa E2ombGSnOZEbPqAhY0F7sISOUQrRgEdcCIEmedN2uKoj4DpuRykxafUILZGX8epU 9xVQ7Vo8pslxgst+pvu9JWpwzhN/vusWcIzUvyHHsTHiZlyCZhDXrHV5v5KtYPik rOqeY7XkHNGRdzB9OfqbtKl+StAY618b4Sk5g0XU/wvVGN7CLzaMqHfn6PhqFdn9 YBzJ8UHPEXB4BbyAd+8p/0DcImEukXWNDu+KI7h6stAkxlDkRNTINleBgyl0GuL7 JTUlw6Q+FulQuHpjs3Sdh28pXhAGZuyg/N15WnE8zD7BhM5ZEUSGGc3wmQnkK/PU 6UeXi3It3oFiJV+QGGAijZJJUZ8bfb3pjWv3bGpQ+0zsGlG44so= =NQxC -----END PGP SIGNATURE----- --sTvi3iZnHrATJtTQ--