sub cp;
sub mv;
-$VERSION = '2.17';
+$VERSION = '2.18';
require Exporter;
@ISA = qw(Exporter);
if ($to_a_handle) {
$to_h = $to;
} else {
- $to = _protect($to) if $to =~ /^\s/s;
- $to_h = \do { local *FH };
+ $to_h = \do { local *FH }; # XXX is this line obsolete?
open $to_h, ">", $to or goto fail_open2;
binmode $to_h or die "($!,$^E)";
$closeto = 1;
my $TB = Test::More->builder;
-plan tests => 461;
+plan tests => 463;
# We're going to override rename() later on but Perl has to see an override
# at compile time to honor it.
unlink "file-$$" or die $!;
unlink "copy-$$" or die $!;
+
+ # RT #73714 copy to file with leading whitespace failed
+
+ open(F, ">file-$$") or die $!;
+ close F;
+ copy "file-$$", " copy-$$";
+ warn "XXX\n";
+ ok -e " copy-$$", "copy with leading whitespace";
+ unlink "file-$$" or die "unlink: $!";
+ unlink " copy-$$" or die "unlink: $!";
+
}