In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/83aebc99b27428f0566bab5ded4d1df2167a9d4a?hp=70747554497f9cb03e742ab188049b9d1e784020>
- Log ----------------------------------------------------------------- commit 83aebc99b27428f0566bab5ded4d1df2167a9d4a Merge: 7074755449 d7408e7abb Author: James E Keenan <[email protected]> Date: Sun Nov 12 18:10:28 2017 -0500 Merge branch 'smoke-me/jkeenan/afresh/132401-file-copy' into blead ----------------------------------------------------------------------- Summary of changes: lib/File/Copy.pm | 4 +++- lib/File/Copy.t | 7 ++++++- pod/perldelta.pod | 5 +++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm index 47e6429771..b796451e37 100644 --- a/lib/File/Copy.pm +++ b/lib/File/Copy.pm @@ -16,13 +16,15 @@ use Config; # And then we need these games to avoid loading overload, as that will # confuse miniperl during the bootstrap of perl. my $Scalar_Util_loaded = eval q{ require Scalar::Util; require overload; 1 }; +# We want HiRes stat and utime if available +BEGIN { eval q{ use Time::HiRes qw( stat utime ) } }; our(@ISA, @EXPORT, @EXPORT_OK, $VERSION, $Too_Big, $Syscopy_is_copy); sub copy; sub syscopy; sub cp; sub mv; -$VERSION = '2.32'; +$VERSION = '2.33'; require Exporter; @ISA = qw(Exporter); diff --git a/lib/File/Copy.t b/lib/File/Copy.t index 25f340d1c0..57d9478a68 100644 --- a/lib/File/Copy.t +++ b/lib/File/Copy.t @@ -24,6 +24,11 @@ BEGIN { *CORE::GLOBAL::rename = sub { CORE::rename($_[0], $_[1]) }; } use File::Copy qw(copy move cp); use Config; +# If we have Time::HiRes, File::Copy loaded it for us. +BEGIN { + eval { Time::HiRes->import(qw( stat utime )) }; + note "Testing Time::HiRes::utime support" unless $@; +} foreach my $code ("copy()", "copy('arg')", "copy('arg', 'arg', 'arg', 'arg')", "move()", "move('arg')", "move('arg', 'arg', 'arg')" @@ -102,7 +107,7 @@ for my $cross_partition_test (0..1) { ok -e "copy-$$", ' target still there'; # Doesn't really matter what time it is as long as its not now. - my $time = 1000000000; + my $time = 1000000000.12345; utime( $time, $time, "copy-$$" ); # Recheck the mtime rather than rely on utime in case we're on a diff --git a/pod/perldelta.pod b/pod/perldelta.pod index f292b52fe7..55bdc13543 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -228,6 +228,11 @@ L<Carp> has been upgraded from version 1.43 to 1.44. If a package on the call stack contains a constant named C<ISA>, Carp no longer throws a "Not a GLOB reference" error. +=item * + +L<File::Copy> has been upgraded from version 2.32 to 2.33. It will now use +Time::HiRes utime where available (RT #132401). + =back =head2 Removed Modules and Pragmata -- Perl5 Master Repository
