This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fully encapsulate check_utime_result()
authorJames E Keenan <jkeenan@cpan.org>
Mon, 29 Oct 2018 21:34:22 +0000 (17:34 -0400)
committerJames E Keenan <jkeenan@cpan.org>
Tue, 30 Oct 2018 21:28:23 +0000 (17:28 -0400)
This will permit us to move the subroutine's definition to the end of
the file, thereby improving readability of main program.

t/io/fs.t

index cb3cad5..31b8ca5 100644 (file)
--- a/t/io/fs.t
+++ b/t/io/fs.t
@@ -248,7 +248,7 @@ $ut = 500000000;
 note("basic check of atime and mtime");
 $foo = (utime $ut,$ut + $delta,'b');
 is($foo, 1, "utime");
-check_utime_result();
+check_utime_result($ut, $accurate_timestamps, $delta);
 
 utime undef, undef, 'b';
 ($atime,$mtime) = (stat 'b')[8,9];
@@ -262,7 +262,7 @@ SKIP: {
     open(my $fh, "<", 'b');
     $foo = (utime $ut,$ut + $delta, $fh);
     is($foo, 1, "futime");
-    check_utime_result();
+    check_utime_result($ut, $accurate_timestamps, $delta);
     # [perl #122703]
     close $fh;
     ok(!utime($ut,$ut + $delta, $fh),
@@ -272,6 +272,7 @@ SKIP: {
 
 
 sub check_utime_result {
+    ($ut, $accurate_timestamps, $delta) = @_;
     ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
      $blksize,$blocks) = stat('b');