Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic
Date: 2017-03-28 11:30:22
Message-ID: 837eb7fd-55bb-1dc6-4727-ca472b0aaaf6@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 03/28/2017 05:23 AM, Dagfinn Ilmari Mannsåker wrote:
> + @opts = grep { !/\$\(/ && /^--/ }
> + map { (my $x = $_) =~ s/\Q$(top_builddir)\E/\"$topdir\"/; $x;}
> + split(/\s+/, $1);
>

The use of this lexical $x variable seems entirely pointless and
obfuscatory. If perlcritic doesn't like it without then that's another
black mark against it IMNSHO.

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= 2017-03-28 11:31:53 Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic
Previous Message Andrew Dunstan 2017-03-28 11:18:27 Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic

Browse pgsql-hackers by date

  From Date Subject
Next Message Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= 2017-03-28 11:31:53 Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic
Previous Message Andrew Dunstan 2017-03-28 11:18:27 Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic