Gisle Aas wrote:
> From what I can see IO::Socket in perl 5.00503 should not make a
> difference between passing Timeout => 0 and not passing this argument
> at all. Could you explain what kind of errors you see?
It's been a while since I had to make that particular change, but
reconstructing it from my notes it looks like setting Timeout in
IO::Socket::INET->new() causes new() to call $self->blocking(). In our
installation, which should be a reasonably standard 5.00503,
IO::Handle::blocking() is in the perldoc but doesn't seem to be
implemented, which caused the surrounding eval{} to fail, so the socket
didn't open, which caused the web query to fail with a broken pipe
error.
The patch I sent to you allows me to get around this problem by setting
timeout to 0 or not defining it. In this case, it changes
LWP::Protocol::http::new() to honor the code's request to not timeout by
not signaling the timeout to the socket.
> An easier patch with the same effect might be:
> - Timeout => $timeout,
> + $timeout ? (Timeout => $timeout) : (),
Absolutely - that'd work equally well.
thanks,
Jeff