From: Gurusamy Sarathy Date: Thu, 31 Jul 1997 13:26:00 +0000 (+1200) Subject: Sys::Hostname -w unclean in trial 2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f4a392ede1380a52c68e83788d09388df905b46b;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/lib/Sys/Hostname.pm b/lib/Sys/Hostname.pm index 360d0eb..cbfd943 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