Skip Menu |

This queue is for tickets about the MogileFS-Client CPAN distribution.

Report information
The Basics
Id: 64145
Status: new
Priority: 0/
Queue: MogileFS-Client

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 1.13
Fixed in: (no value)



Subject: Unreachable code path in MogileFS::Backend::_connect_sock
I stumbled over these lines in the _connect_sock function of MogileFS::Backend: sub _connect_sock { # sock, sin, timeout my ($sock, $sin, $timeout) = @_; $timeout ||= 0.25; # make the socket non-blocking for the connection if wanted, but # unconditionally set it back to blocking mode at the end if ($timeout) { IO::Handle::blocking($sock, 0); } else { IO::Handle::blocking($sock, 1); } ... I think that the "else" block cannot be ever reached. If $timeout was missing or undef or 0 in the _connect_sock call, then it's set to 0.25. Otherwise $timeout is true, and the "if" block is always executed. Probably setting the $timeout default should happen with //= instead, or the pre-5.10.0 equivalent of this construct. Regards, Slaven