diff options
author | Graham Barr <gbarr@pobox.com> | 2004-03-20 12:15:21 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 2009-02-24 08:51:37 -0600 |
commit | 2d05e2805ff808db40b872746cd5c0332f0b2577 (patch) | |
tree | a794dc802abe93570918dd630749f0c79860b1b5 | |
parent | cfd65fda23d20e179fe0bc41c52aa8290570b3bb (diff) | |
download | perl-libnet-2d05e2805ff808db40b872746cd5c0332f0b2577.tar.gz |
Avoid undef warnings
-rw-r--r-- | t/hostname.t | 4 |
1 files 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" |