@@ -22,9 +22,9 @@ my @mtime;
2222for (1..5) {
2323 note " cycle $_ " ;
2424 Time::HiRes::sleep (rand (0.1) + 0.1);
25- open (X , ' >' , $$ );
26- print X $$ ;
27- close (X );
25+ open (my $fh , ' >' , $$ );
26+ print $fh $$ ;
27+ close ($fh );
2828 my ($a , $stat , $b ) = (" a" , [Time::HiRes::stat ($$ )], " b" );
2929 is $a , " a" , " stat stack discipline" ;
3030 is $b , " b" , " stat stack discipline" ;
@@ -43,9 +43,9 @@ for (1..5) {
4343 }
4444 is_deeply $lstat , $stat , " write: stat and lstat returned same values" ;
4545 Time::HiRes::sleep (rand (0.1) + 0.1);
46- open (X , ' <' , $$ );
47- <X >;
48- close (X );
46+ open (my $fh , ' <' , $$ );
47+ <$fh >;
48+ close ($fh );
4949 $stat = [Time::HiRes::stat ($$ )];
5050 push @atime , $stat -> [8];
5151 $lstat = [Time::HiRes::lstat ($$ )];
@@ -88,9 +88,9 @@ SKIP: {
8888my $targetname = " tgt$$ " ;
8989my $linkname = " link$$ " ;
9090SKIP: {
91- open (X , ' >' , $targetname );
92- print X $$ ;
93- close (X );
91+ open (my $fh , ' >' , $targetname );
92+ print $fh $$ ;
93+ close ($fh );
9494 eval { symlink $targetname , $linkname or die " can't symlink: $! " ; };
9595 skip " can't symlink" , 7 if $@ ne " " ;
9696 note " compare Time::HiRes::stat with ::lstat" ;
@@ -111,5 +111,3 @@ SKIP: {
111111}
1121121 while unlink $linkname ;
1131131 while unlink $targetname ;
114-
115- 1;
0 commit comments