summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/lib/Net/netent.pm
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/lib/Net/netent.pm')
-rw-r--r--contrib/perl5/lib/Net/netent.pm19
1 files changed, 10 insertions, 9 deletions
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;
OpenPOWER on IntegriCloud