From: Jarkko Hietaniemi <jhi@iki.fi>
Date: Mon, 22 Oct 2001 19:58:34 +0000 (+0000)
Subject: getpwuid() might succeed but that's no guarantee
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c44feae73a9ab8dd587fbb4994f81bc46dd2f1d9;p=p5sagit%2Fp5-mst-13.2.git

getpwuid() might succeed but that's no guarantee
that the $home will be defined.

p4raw-id: //depot/perl@12588
---

diff --git a/ext/File/Glob/t/basic.t b/ext/File/Glob/t/basic.t
index 65fa36a..c6fc217 100755
--- a/ext/File/Glob/t/basic.t
+++ b/ext/File/Glob/t/basic.t
@@ -50,7 +50,7 @@ if ($^O ne 'MSWin32' && $^O ne 'NetWare' && $^O ne 'VMS' && $^O ne 'os2') {
     1;
   } and do {
     @a = bsd_glob("~$name", GLOB_TILDE);
-    if (scalar(@a) != 1 || $a[0] ne $home || GLOB_ERROR) {
+    if (defined $home && (scalar(@a) != 1 || $a[0] ne $home || GLOB_ERROR)) {
 	print "not ";
     }
   };