Skip Menu |

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

Report information
The Basics
Id: 97884
Status: resolved
Priority: 0/
Queue: Net-Ping

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

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



Subject: Ping timeout parameter
This is very minor... The documentation says "The optional timeout must be greater than 0 seconds and defaults to whatever was specified when the ping object was created." The code says: $timeout = $self->{"timeout"} unless $timeout; croak("Timeout must be greater than 0 seconds") if $timeout <= 0; If we pass a timeout of 0, it uses the default and only throws an exception if we pass a negative value. The most obvious fix is to change that to: $timeout = $self->{"timeout"} unless defined $timeout; croak("Timeout must be greater than 0 seconds") if $timeout <= 0; (I only found because I was expanding the test suite for Mock::Net::Ping.)
Thanks, done with 2.66 -- Reini Urban