Re: [COMMITTERS] pgsql: Clean up Perl code according toperlcritic - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [COMMITTERS] pgsql: Clean up Perl code according toperlcritic
Date
Msg-id 837eb7fd-55bb-1dc6-4727-ca472b0aaaf6@2ndQuadrant.com
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
List 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




pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [COMMITTERS] pgsql: Clean up Perl code according toperlcritic
Next
From: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Subject: Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic