$Is_Cygwin = $^O eq 'cygwin';
$Is_Darwin = $^O eq 'darwin';
$Is_Dos = $^O eq 'dos';
-$Is_MacOS = $^O eq 'MacOS';
$Is_MPE = $^O eq 'mpeix';
$Is_MSWin32 = $^O eq 'MSWin32';
$Is_NetWare = $^O eq 'NetWare';
my $Curdir = File::Spec->curdir;
-my $tmpfile = 'Op_stat.tmp';
-my $tmpfile_link = $tmpfile.'2';
+my $tmpfile = tempfile();
+my $tmpfile_link = tempfile();
chmod 0666, $tmpfile;
1 while unlink $tmpfile;
SKIP: {
skip "mtime and ctime not reliable", 2
- if $Is_MSWin32 or $Is_NetWare or $Is_Cygwin or $Is_Dos or $Is_MacOS or $Is_Darwin;
+ if $Is_MSWin32 or $Is_NetWare or $Is_Cygwin or $Is_Dos or $Is_Darwin;
ok( $mtime, 'mtime' );
is( $mtime, $ctime, 'mtime == ctime' );
SKIP: {
skip "-x simply determines if a file ends in an executable suffix", 1
- if $Is_Dosish || $Is_MacOS;
+ if $Is_Dosish;
ok(-x $tmpfile, ' -x');
}
ok(-d DIR, "-d on a dirhandle works");
# And now for the ambigious bareword case
- ok(open(DIR, "TEST"), 'Can open "TEST" dir')
- || diag "Can't open 'TEST': $!";
+ {
+ no warnings 'deprecated';
+ ok(open(DIR, "TEST"), 'Can open "TEST" dir')
+ || diag "Can't open 'TEST': $!";
+ }
my $size = (stat(DIR))[7];
ok(defined $size, "stat() on bareword works");
is($size, -s "TEST", "size returned by stat of bareword is for the file");
ok(-d -r *DIR{IO} , "chained -x's on *DIR{IO}");
# And now for the ambigious bareword case
- ok(open(DIR, "TEST"), 'Can open "TEST" dir')
- || diag "Can't open 'TEST': $!";
+ {
+ no warnings 'deprecated';
+ ok(open(DIR, "TEST"), 'Can open "TEST" dir')
+ || diag "Can't open 'TEST': $!";
+ }
my $size = (stat(*DIR{IO}))[7];
ok(defined $size, "stat() on *THINGY{IO} works");
is($size, -s "TEST",