Commit d5c25b3f authored by Thibaut Hourlier's avatar Thibaut Hourlier
Browse files

Fix precedence problem by replacing or with ||

Since Perl 5.22, it warns of possible precedence problem it cases
like : return $value or die('Sad');
return $value is tested, not $value. It can be fixed by either using
|| or by using () around the test.
The problem was already there in earlier versions of Perl but no
waring was issued.
parent 95d83ed4
......@@ -129,7 +129,7 @@ sub zconn {
($self->{zconn}) = @arg;
$self->try_send; # may have been postponed due to lack of zconn
}
return $self->{zconn} or
return $self->{zconn} ||
die "Need zconn set now";
}
......@@ -261,7 +261,7 @@ sub new {
sub zconn {
my ($self, @arg) = @_;
($self->{zconn}) = @arg if @arg;
return $self->{zconn} or
return $self->{zconn} ||
die "Need zconn set now";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment