@@ -22,9 +22,9 @@ my @mtime;
22
22
for (1..5) {
23
23
note " cycle $_ " ;
24
24
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 );
28
28
my ($a , $stat , $b ) = (" a" , [Time::HiRes::stat ($$ )], " b" );
29
29
is $a , " a" , " stat stack discipline" ;
30
30
is $b , " b" , " stat stack discipline" ;
@@ -43,9 +43,9 @@ for (1..5) {
43
43
}
44
44
is_deeply $lstat , $stat , " write: stat and lstat returned same values" ;
45
45
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 );
49
49
$stat = [Time::HiRes::stat ($$ )];
50
50
push @atime , $stat -> [8];
51
51
$lstat = [Time::HiRes::lstat ($$ )];
@@ -88,9 +88,9 @@ SKIP: {
88
88
my $targetname = " tgt$$ " ;
89
89
my $linkname = " link$$ " ;
90
90
SKIP: {
91
- open (X , ' >' , $targetname );
92
- print X $$ ;
93
- close (X );
91
+ open (my $fh , ' >' , $targetname );
92
+ print $fh $$ ;
93
+ close ($fh );
94
94
eval { symlink $targetname , $linkname or die " can't symlink: $! " ; };
95
95
skip " can't symlink" , 7 if $@ ne " " ;
96
96
note " compare Time::HiRes::stat with ::lstat" ;
@@ -111,5 +111,3 @@ SKIP: {
111
111
}
112
112
1 while unlink $linkname ;
113
113
1 while unlink $targetname ;
114
-
115
- 1;
0 commit comments