From: "mike@exegenix.com (via RT)" <perlbug-followup@perl.org>
Message-Id: <rt-21672-54038.2.
07650993465862@bugs6.perl.org>
plus a regression test
p4raw-id: //depot/perl@19072
defined $perms or $perms = 0666;
return sysopen($fh, $file, $mode, $perms);
}
- if (! File::Spec->file_name_is_absolute($file)) {
- $file = File::Spec->catfile(File::Spec->curdir(),$file);
- }
+ if (defined($file) && length($file)
+ && ! File::Spec->file_name_is_absolute($file))
+ {
+ $file = File::Spec->catfile(File::Spec->curdir(),$file);
+ }
$file = IO::Handle::_open_mode_string($mode) . " $file\0";
}
open($fh, $file);
$mystdout = new_from_fd FileHandle 1,"w";
$| = 1;
autoflush $mystdout;
-print "1..11\n";
+print "1..12\n";
print $mystdout "ok ".fileno($mystdout)."\n";
exit(0);
}
}
+
+print FileHandle->new('','r') ? "not ok 12\n" : "ok 12\n";