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

From Andrew Dunstan
Subject Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic
Date
Msg-id f500d172-dadc-880f-5e43-97932d867ede@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 07:31 AM, Dagfinn Ilmari Mannsåker wrote:
> Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes:
>
>> I would try something like this:
>>
>>     @opts = grep { $_ !~ /\$\(/ && $_ =~ /^--/  } 
>>       map { s/\Q$(top_builddir)\E/\"$topdir\"/; }
>>       split(/\s+/, $1);
> That map is not going to work: it'll modify the values returned by
> split(), but s/// (without the /r modifier, which was added in 5.14)
> returns the number of substitutions made, not the modified string.


Oh. Bleah.

OK. well, we should note that in comments then.

cheers

andrew

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




pgsql-hackers by date:

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