diff options
Diffstat (limited to 'contrib/perl5/lib/Net')
-rw-r--r-- | contrib/perl5/lib/Net/Ping.pm | 11 | ||||
-rw-r--r-- | contrib/perl5/lib/Net/hostent.pm | 3 | ||||
-rw-r--r-- | contrib/perl5/lib/Net/netent.pm | 19 | ||||
-rw-r--r-- | contrib/perl5/lib/Net/protoent.pm | 3 | ||||
-rw-r--r-- | contrib/perl5/lib/Net/servent.pm | 3 |
5 files changed, 21 insertions, 18 deletions
diff --git a/contrib/perl5/lib/Net/Ping.pm b/contrib/perl5/lib/Net/Ping.pm index 495b82f..2713383 100644 --- a/contrib/perl5/lib/Net/Ping.pm +++ b/contrib/perl5/lib/Net/Ping.pm @@ -4,18 +4,17 @@ package Net::Ping; # # Authors of the original pingecho(): # karrer@bernina.ethz.ch (Andreas Karrer) -# pmarquess@bfsec.bt.co.uk (Paul Marquess) +# Paul.Marquess@btinternet.com (Paul Marquess) # # Copyright (c) 1996 Russell Mosemann. All rights reserved. This # 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); diff --git a/contrib/perl5/lib/Net/hostent.pm b/contrib/perl5/lib/Net/hostent.pm index d586358..6cfde72 100644 --- a/contrib/perl5/lib/Net/hostent.pm +++ b/contrib/perl5/lib/Net/hostent.pm @@ -1,9 +1,10 @@ package Net::hostent; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(gethostbyname gethostbyaddr gethost); @EXPORT_OK = qw( $h_name @h_aliases diff --git a/contrib/perl5/lib/Net/netent.pm b/contrib/perl5/lib/Net/netent.pm index fbc6d98..b21cd04 100644 --- a/contrib/perl5/lib/Net/netent.pm +++ b/contrib/perl5/lib/Net/netent.pm @@ -1,9 +1,10 @@ package Net::netent; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(getnetbyname getnetbyaddr getnet); @EXPORT_OK = qw( $n_name @n_aliases @@ -119,26 +120,26 @@ This seems a bug, but here's how to deal with it: use strict; use Socket; use Net::netent; - + @ARGV = ('loopback') unless @ARGV; - + my($n, $net); - + for $net ( @ARGV ) { - + unless ($n = getnetbyname($net)) { warn "$0: no such net: $net\n"; next; } - + printf "\n%s is %s%s\n", $net, lc($n->name) eq lc($net) ? "" : "*really* ", $n->name; - + print "\taliases are ", join(", ", @{$n->aliases}), "\n" if @{$n->aliases}; - + # this is stupid; first, why is this not in binary? # second, why am i going through these convolutions # to make it looks right @@ -147,7 +148,7 @@ This seems a bug, but here's how to deal with it: shift @a while @a && $a[0] == 0; printf "\taddr is %s [%d.%d.%d.%d]\n", $n->net, @a; } - + if ($n = getnetbyaddr($n->net)) { if (lc($n->name) ne lc($net)) { printf "\tThat addr reverses to net %s!\n", $n->name; diff --git a/contrib/perl5/lib/Net/protoent.pm b/contrib/perl5/lib/Net/protoent.pm index 737ff5a..334af78 100644 --- a/contrib/perl5/lib/Net/protoent.pm +++ b/contrib/perl5/lib/Net/protoent.pm @@ -1,9 +1,10 @@ package Net::protoent; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(getprotobyname getprotobynumber getprotoent); @EXPORT_OK = qw( $p_name @p_aliases $p_proto ); %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] ); diff --git a/contrib/perl5/lib/Net/servent.pm b/contrib/perl5/lib/Net/servent.pm index fb85dd0..c892af0 100644 --- a/contrib/perl5/lib/Net/servent.pm +++ b/contrib/perl5/lib/Net/servent.pm @@ -1,9 +1,10 @@ package Net::servent; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(getservbyname getservbyport getservent getserv); @EXPORT_OK = qw( $s_name @s_aliases $s_port $s_proto ); %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] ); |