pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic
Date: Tue, 28 Mar 2017 07:38:51 -0400
Message-ID: <f500d172-dadc-880f-5e43-97932d867ede@2ndQuadrant.com> (raw)
In-Reply-To: <d8jinmtvdqu.fsf@dalvik.ping.uio.no>
References: <E1csTgB-0003xZ-3P@gemulon.postgresql.org>
	<14575.1490652977@sss.pgh.pa.us>
	<4193.1490662733@sss.pgh.pa.us>
	<88bc7984-f630-0629-e8f5-36211a31601c@2ndQuadrant.com>
	<d8jinmtvdqu.fsf@dalvik.ping.uio.no>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (11+ messages)  latest in thread

Message-ID: <f500d172-dadc-880f-5e43-97932d867ede@2ndQuadrant.com>
Permalink:  ../f500d172-dadc-880f-5e43-97932d867ede@2ndQuadrant.com/
Also on:    postgresql.org/message-id/f500d172-dadc-880f-5e43-97932d867ede@2ndQuadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andrew.dunstan@2ndquadrant.com, ilmari@ilmari.org, tgl@sss.pgh.pa.us, peter_e@gmx.net, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic
  In-Reply-To: <f500d172-dadc-880f-5e43-97932d867ede@2ndQuadrant.com>
  References: <E1csTgB-0003xZ-3P@gemulon.postgresql.org> <14575.1490652977@sss.pgh.pa.us> <4193.1490662733@sss.pgh.pa.us> <88bc7984-f630-0629-e8f5-36211a31601c@2ndQuadrant.com> <d8jinmtvdqu.fsf@dalvik.ping.uio.no> <f500d172-dadc-880f-5e43-97932d867ede@2ndQuadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox