Upgrade to CPAN 1.58, from Andreas König.
[p5sagit/p5-mst-13.2.git] / lib / Net / Ping.pm
index 5454060..40da9f3 100644 (file)
@@ -10,12 +10,11 @@ package Net::Ping;
 # program is free software; you may redistribute it and/or modify it
 # under the same terms as Perl itself.
 
-require 5.002;
+use 5.005_64;
 require Exporter;
 
 use strict;
-use vars qw(@ISA @EXPORT $VERSION
-            $def_timeout $def_proto $max_datasize);
+our(@ISA, @EXPORT, $VERSION, $def_timeout, $def_proto, $max_datasize);
 use FileHandle;
 use Socket qw( SOCK_DGRAM SOCK_STREAM SOCK_RAW PF_INET
                inet_aton sockaddr_in );
@@ -423,7 +422,7 @@ Net::Ping - check a remote host for reachability
         sleep(1);
     }
     $p->close();
-    
+
     $p = Net::Ping->new("tcp", 2);
     while ($stop_time > time())
     {
@@ -432,7 +431,7 @@ Net::Ping - check a remote host for reachability
         sleep(300);
     }
     undef($p);
-    
+
     # For backward compatibility
     print "$host is alive.\n" if pingecho($host);
 
@@ -443,7 +442,11 @@ hosts on a network.  A ping object is first created with optional
 parameters, a variable number of hosts may be pinged multiple
 times and then the connection is closed.
 
-You may choose one of three different protocols to use for the ping.
+You may choose one of three different protocols to use for the
+ping. The "udp" protocol is the default. Note that a live remote host
+may still fail to be pingable by one or more of these protocols. For
+example, www.microsoft.com is generally alive but not pingable.
+
 With the "tcp" protocol the ping() method attempts to establish a
 connection to the remote host's echo port.  If the connection is
 successfully established, the remote host is considered reachable.  No