X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FNet%2Fnetent.pm;h=f7d32cb92542fb56af875ccc8bf4825627f3a68f;hb=c798bd2165d7b5d59c62ab6330f7cf77ff8b09dd;hp=d8c094ae81dad9af806efecc5a6ee3ff83c622ce;hpb=cb50131aab68ac6dda048612c6e853b8cb08701e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Net/netent.pm b/lib/Net/netent.pm index d8c094a..f7d32cb 100644 --- a/lib/Net/netent.pm +++ b/lib/Net/netent.pm @@ -1,7 +1,8 @@ package Net::netent; use strict; -use 5.005_64; +use 5.006_001; +our $VERSION = '1.00'; our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); @@ -120,26 +121,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 @@ -148,7 +149,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;