diff options
author | Gurusamy Sarathy <gsar@engin.umich.edu> | 1997-08-01 01:26:00 +1200 |
---|---|---|
committer | Tim Bunce <Tim.Bunce@ig.co.uk> | 1997-08-07 00:00:00 +1200 |
commit | f4a392ede1380a52c68e83788d09388df905b46b (patch) | |
tree | 36cd154cc10347486e5846566d0bdb4b301dcd20 /lib/Sys | |
parent | 2d6e8844418f04cf1f298aae428c67ef34c59b35 (diff) | |
download | perl-f4a392ede1380a52c68e83788d09388df905b46b.tar.gz |
Sys::Hostname -w unclean in trial 2
Subject: [PATCH] trial2: Sys::Hostname -w unclean
The new Sys::Hostname generates a compiler warning.
[editor's note: the base for this one is wrong. Previously
gethostbyname was called in void context.]
p5p-msgid: 199708032055.QAA14278@aatma.engin.umich.edu
Diffstat (limited to 'lib/Sys')
-rw-r--r-- | lib/Sys/Hostname.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sys/Hostname.pm b/lib/Sys/Hostname.pm index 360d0eb910..cbfd943591 100644 --- a/lib/Sys/Hostname.pm +++ b/lib/Sys/Hostname.pm @@ -40,7 +40,7 @@ sub hostname { # method 2 - no sockets ==> return DECnet node name eval {local $SIG{'__DIE__'}; - my($test) = gethostbyname('me')}; # returns 'me' on most systems + ($host) = gethostbyname('me')}; # returns 'me' on most systems if ($@) { return $host = $ENV{'SYS$NODE'}; } # method 3 - has someone else done the job already? It's common for the |