Re: pgsql: Fix precedence problem in new Perl code.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Blackwell <mike(dot)blackwell(at)rrd(dot)com>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix precedence problem in new Perl code.
Date: 2018-05-04 15:19:01
Message-ID: 32073.1525447141@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Mike Blackwell <mike(dot)blackwell(at)rrd(dot)com> writes:
> In my experience, that would more commonly be written with the lower
> precedence "or" operator (with or without the param list parens):
> unlink $temp_name or die "unlink: $temp_name: $!";

Yeah, I thought about that, but the pre-existing rename call had ||
and I didn't want to deviate from the existing style; I'm not a good
enough Perl programmer to be entitled to have opinions about Perl style.

Probably all of this code could use a visit from the Perl style police.
I wonder if anyone's tried perlcritic on it recently.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-05-04 16:27:09 pgsql: Sync our copy of the timezone library with IANA release tzcode20
Previous Message Mike Blackwell 2018-05-04 14:30:05 Re: pgsql: Fix precedence problem in new Perl code.

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2018-05-04 15:22:51 Re: Built-in connection pooling
Previous Message Mike Palmiotto 2018-05-04 15:17:37 Re: Proper way to reload config files in backend SIGHUP handler