From f4a392ede1380a52c68e83788d09388df905b46b Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Fri, 1 Aug 1997 01:26:00 +1200 Subject: 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 --- lib/Sys/Hostname.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Sys') 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 -- cgit v1.2.1