Skip to content

Modernise File::Copy a little #23515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 11 additions & 19 deletions lib/File/Copy.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,29 @@
# Additions copyright 1996 by Charles Bailey. Permission is granted
# to distribute the revised code under the same terms as Perl itself.

package File::Copy;
package File::Copy 2.42;

use v5.40;
no warnings 'newline';

use 5.035007;
use strict;
use warnings; no warnings 'newline';
no warnings 'experimental::builtin';
use builtin 'blessed';
use overload;
use File::Spec;
use Config;
use Exporter 'import';

# 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.41';

require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(copy move);
@EXPORT_OK = qw(cp mv);
our @EXPORT = qw(copy move);
our @EXPORT_OK = qw(cp mv);

$Too_Big = 1024 * 1024 * 2;
our $Syscopy_is_copy;
our $Too_Big = 1024 * 1024 * 2;

sub croak {
require Carp;
Expand Down Expand Up @@ -327,8 +324,6 @@ unless (defined &syscopy) {
}
}

1;

__END__
=head1 NAME
Expand Down Expand Up @@ -508,6 +503,3 @@ filesystem(s).
File::Copy was written by Aaron Sherman I<E<lt>ajs@ajs.comE<gt>> in 1995,
and updated by Charles Bailey I<E<lt>bailey@newman.upenn.eduE<gt>> in 1996.
=cut
Loading