Robert Spier <[EMAIL PROTECTED]> wrote:
> > - my $timeout = $self->config('timeout');
> > + my $timeout = $self->config('timeoutsmtpd') # qmail smtpd control file
> > + or $self->config('timeout') # qpsmtpd override
> > + or 1200; # default smtpd value
>
> Please don't use C< or >. use C< || > unless you really need
> C<or>. (They have different precedence levels.)
>
> In this particular case, it doesn't make a difference, but I've seen
> too many cases of people making a royal mess when they try and change
> code that uses C<or>.
In this case, it does make a difference. With 'or', $timeout
will
never be set to either $self->config('timeout') or 1200.
That's
because '=' binds tighter than 'or', so
$a = $b or $c;
means
( $a = $b ) or $c;
The values after the 'or' in the patch are just being thrown
away
(I'm a little surprised it doesn't generate a warning), so this
isn't just a religious issue.
--
Keith C. Ivey <[EMAIL PROTECTED]>
Washington, DC