diff options
Diffstat (limited to 'lib/File/Copy.pm')
-rw-r--r-- | lib/File/Copy.pm | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm index 9acdbe5107..57bf6a4c4a 100644 --- a/lib/File/Copy.pm +++ b/lib/File/Copy.pm @@ -7,15 +7,13 @@ package File::Copy; -use 5.006; +use 5.035007; use strict; use warnings; no warnings 'newline'; +use builtin 'blessed'; +use overload; use File::Spec; use Config; -# During perl build, we need File::Copy but Scalar::Util might not be built yet -# 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); @@ -24,7 +22,7 @@ sub syscopy; sub cp; sub mv; -$VERSION = '2.37'; +$VERSION = '2.38'; require Exporter; @ISA = qw(Exporter); @@ -56,8 +54,7 @@ sub _catname { # _eq($from, $to) tells whether $from and $to are identical sub _eq { my ($from, $to) = map { - $Scalar_Util_loaded && Scalar::Util::blessed($_) - && overload::Method($_, q{""}) + blessed($_) && overload::Method($_, q{""}) ? "$_" : $_ } (@_); |