From: Perl 5 Porters Date: Tue, 14 May 1996 08:53:41 +0000 (+0000) Subject: Fix VMS test to eliminate void context warning X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a31035c61afa529d7cc9672cc1f9c46ddd3aae84;p=p5sagit%2Fp5-mst-13.2.git Fix VMS test to eliminate void context warning --- diff --git a/lib/Sys/Hostname.pm b/lib/Sys/Hostname.pm index 2c40361..d527e45 100644 --- a/lib/Sys/Hostname.pm +++ b/lib/Sys/Hostname.pm @@ -39,7 +39,7 @@ sub hostname { if ($^O eq 'VMS') { # method 2 - no sockets ==> return DECnet node name - eval {gethostbyname('me')}; + eval {my($test) = 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