| From: | ilmari(at)ilmari(dot)org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) |
|---|---|
| To: | Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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:31:53 |
| Message-ID: | d8jinmtvdqu.fsf@dalvik.ping.uio.no |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers pgsql-hackers |
Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)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.
--
"The surreality of the universe tends towards a maximum" -- Skud's Law
"Never formulate a law or axiom that you're not prepared to live with
the consequences of." -- Skud's Meta-Law
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2017-03-28 11:38:51 | Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic |
| Previous Message | Andrew Dunstan | 2017-03-28 11:30:22 | Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2017-03-28 11:38:51 | Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic |
| Previous Message | Andrew Dunstan | 2017-03-28 11:30:22 | Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic |