about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>1998-08-07 01:15:23 +0000
committerGraham Barr <gbarr@pobox.com>1998-08-07 01:15:23 +0000
commita40414515b5c258bc0899a4139c510a9e97ceb26 (patch)
tree38d3aeeb9254e822fd7c1ef78ee9d351a67c1f23
parent6d9f85b7800305ea585ebe8506fdde7a98a5ec4f (diff)
downloadperl-libnet-a40414515b5c258bc0899a4139c510a9e97ceb26.tar.gz
Net::Domain
- Fix problem with returning last name instead of first name for a
  win32 multi-homed machine

-rw-r--r--Net/Domain.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Net/Domain.pm b/Net/Domain.pm
index f6f0c0a..328efdb 100644
--- a/Net/Domain.pm
+++ b/Net/Domain.pm
@@ -16,7 +16,7 @@ use Net::Config;
 @ISA = qw(Exporter);
 @EXPORT_OK = qw(hostname hostdomain hostfqdn domainname);
 
-$VERSION = "2.09"; # $Id: //depot/libnet/Net/Domain.pm#7 $
+$VERSION = "2.10"; # $Id: //depot/libnet/Net/Domain.pm#8 $
 
 my($host,$domain,$fqdn) = (undef,undef,undef);
 
@@ -33,7 +33,7 @@ sub _hostname {
         my ($name,$alias,$type,$len,@addr) =  gethostbyname($ENV{'COMPUTERNAME'}||'localhost');
         while (@addr)
          {
-          my $a = pop(@addr);
+          my $a = shift(@addr);
           $host = gethostbyaddr($a,Socket::AF_INET());
           last if defined $host;
          }