Skip Menu |

This queue is for tickets about the Net-Gopher CPAN distribution.

Report information
The Basics
Id: 5617
Status: new
Priority: 0/
Queue: Net-Gopher

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.40
  • 0.43
  • 0.47
  • 0.57
  • 0.77
  • 0.78
  • 0.80
  • 0.90
  • 0.92
  • 0.93
  • 0.94
  • 0.95
  • 0.96_1
  • 0.96
  • 0.97
Fixed in: (no value)



Subject: Net::Gopher sticky errors
IO::Socket sets $@ to an error string if new() fails to connect, but IO::Socket doesn't reset $@ for each call to new. Net::Gopher request(), rather than checking the return value of IO::Socket::INET->new(), looks at $@ to see if new() failed to connect. This means that if one request() call fails to connect, then all subsequent ones will as well, since $@ will contain the same error string and request() will look to it to determine success or failure. Net::Gopher request() also doesn't reset _network_error(), so if a request() call fails elsewhere, it will appear to have failed in the exact same way again and again for each subsequent request() call using the same Net::Gopher object. To fix these problems, Net::Gopher MUST reset $self->_network_error at the beginning of request(), and then must either reset $@ before calling IO::Socket::INET->new or check the return value of the call to new() instead of looking at $@.