From 2d05e2805ff808db40b872746cd5c0332f0b2577 Mon Sep 17 00:00:00 2001 From: Graham Barr Date: Sat, 20 Mar 2004 12:15:21 +0000 Subject: Avoid undef warnings --- t/hostname.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/hostname.t b/t/hostname.t index e085591..9db66a9 100644 --- a/t/hostname.t +++ b/t/hostname.t @@ -32,11 +32,11 @@ else { print "not ok 1\n"; } -# This check thats hostanme does not overwrite $_ +# This checks thats hostanme does not overwrite $_ my @domain = qw(foo.example.com bar.example.jp); my @copy = @domain; -my @dummy = grep { hostname eq $_ } @domain; +my @dummy = grep { defined hostname() and hostname() eq $_ } @domain; ($domain[0] && $domain[0] eq $copy[0]) ? print "ok 2\n" -- cgit v1.2.3-24-ge0c7