diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2021-12-08 13:17:27 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2021-12-14 22:33:14 +0000 |
commit | 6846383a6b921712f691063af9579b657821af35 (patch) | |
tree | d3719df350ec9ed691e28f79402598c1c7e1ad5f | |
parent | 154c57f9af4d02a7f0aff4f15ce803e6534d5186 (diff) | |
download | perl-6846383a6b921712f691063af9579b657821af35.tar.gz |
No need for avoiding overload in File::Copy
-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{""}) ? "$_" : $_ } (@_); |