Change 16409 by jhi@alpha on 2002/05/05 01:53:24
Upgrade to Net::Ping 2.17.
Affected files ...
.... //depot/perl/lib/Net/Ping.pm#30 edit
.... //depot/perl/lib/Net/Ping/CHANGES#9 edit
.... //depot/perl/lib/Net/Ping/README#8 edit
Differences ...
==== //depot/perl/lib/Net/Ping.pm#30 (text) ====
Index: perl/lib/Net/Ping.pm
--- perl/lib/Net/Ping.pm.~1~ Sat May 4 20:00:06 2002
+++ perl/lib/Net/Ping.pm Sat May 4 20:00:06 2002
@@ -1,6 +1,6 @@
package Net::Ping;
-# $Id: Ping.pm,v 1.31 2002/04/11 16:45:06 rob Exp $
+# $Id: Ping.pm,v 1.33 2002/05/03 21:54:59 rob Exp $
require 5.002;
require Exporter;
@@ -12,11 +12,11 @@
use Socket qw( SOCK_DGRAM SOCK_STREAM SOCK_RAW PF_INET
inet_aton inet_ntoa sockaddr_in );
use Carp;
-use Errno qw(ECONNREFUSED);
+use POSIX qw(ECONNREFUSED);
@ISA = qw(Exporter);
@EXPORT = qw(pingecho);
-$VERSION = "2.16";
+$VERSION = "2.17";
# Constants
@@ -26,6 +26,12 @@
# The data we exchange with the server for the stream protocol
$pingstring = "pingschwingping!\n";
+if ($^O =~ /Win32/i) {
+ # Hack to avoid this Win32 spewage:
+ # Your vendor has not defined POSIX macro ECONNREFUSED
+ *ECONNREFUSED = sub {10061;}; # "Unknown Error" Special Win32 Response?
+};
+
# Description: The pingecho() subroutine is provided for backward
# compatibility with the original Net::Ping. It accepts a host
# name/IP and an optional timeout in seconds. Create a tcp ping
@@ -367,8 +373,7 @@
$@ = ""; $! = 0;
$ret = $self -> tcp_connect( $ip, $timeout);
- $ret = 1 if $! == ECONNREFUSED # Connection refused
- || $@ =~ /Unknown Error/i; # Special Win32 response?
+ $ret = 1 if $! == ECONNREFUSED; # Connection refused
$self->{"fh"}->close();
return $ret;
}
@@ -667,7 +672,7 @@
Net::Ping - check a remote host for reachability
-$Id: Ping.pm,v 1.31 2002/04/11 16:45:06 rob Exp $
+$Id: Ping.pm,v 1.33 2002/05/03 21:54:59 rob Exp $
=head1 SYNOPSIS
==== //depot/perl/lib/Net/Ping/CHANGES#9 (text) ====
Index: perl/lib/Net/Ping/CHANGES
--- perl/lib/Net/Ping/CHANGES.~1~ Sat May 4 20:00:06 2002
+++ perl/lib/Net/Ping/CHANGES Sat May 4 20:00:06 2002
@@ -1,6 +1,12 @@
CHANGES
-------
+2.17 May 03 18:00 2002
+ - RPM spec generalizations.
+ [EMAIL PROTECTED] (Michael McLagan)
+ - Win32 compatibility changes.
+ (Didn't compile on Win32 since v2.11.)
+
2.16 Apr 11 14:00 2002
- Documentation changes.
- Added INSTALL doc.
==== //depot/perl/lib/Net/Ping/README#8 (text) ====
Index: perl/lib/Net/Ping/README
--- perl/lib/Net/Ping/README.~1~ Sat May 4 20:00:06 2002
+++ perl/lib/Net/Ping/README Sat May 4 20:00:06 2002
@@ -1,7 +1,7 @@
NAME
Net::Ping - check a remote host for reachability
- $Id: Ping.pm,v 1.31 2002/04/11 16:45:06 rob Exp $
+ $Id: Ping.pm,v 1.33 2002/05/03 21:54:59 rob Exp $
SYNOPSIS
use Net::Ping;
End of Patch.