Change 34996 by [EMAIL PROTECTED] on 2008/12/03 20:50:06 Integrate: Just the 'make Copy.t strict-safe' part of: [ 33794] Subject: [PATCH] File::Copy & permission bits. From: Abigail <[EMAIL PROTECTED]> Date: Wed, 7 May 2008 23:16:54 +0200 Message-ID: <[EMAIL PROTECTED]> Just some comment changes from: [ 33795] Bump version and document last change.
Affected files ... ... //depot/maint-5.10/perl/lib/File/Copy.pm#4 edit ... //depot/maint-5.10/perl/lib/File/Copy.t#4 edit Differences ... ==== //depot/maint-5.10/perl/lib/File/Copy.pm#4 (text) ==== Index: perl/lib/File/Copy.pm --- perl/lib/File/Copy.pm#3~34522~ 2008-10-20 02:38:51.000000000 -0700 +++ perl/lib/File/Copy.pm 2008-12-03 12:50:06.000000000 -0800 @@ -12,6 +12,9 @@ use warnings; use File::Spec; use Config; +# During perl build, we need File::Copy but Fcntl might not be built yet +# *** not needed for 2.13, only 2.14 +# *** my $Fcntl_loaded = eval q{ use Fcntl qw [O_CREAT O_WRONLY O_TRUNC]; 1 }; # Similarly Scalar::Util # And then we need these games to avoid loading overload, as that will # confuse miniperl during the bootstrap of perl. @@ -22,11 +25,6 @@ sub cp; sub mv; -# Note that this module implements only *part* of the API defined by -# the File/Copy.pm module of the File-Tools-2.0 package. However, that -# package has not yet been updated to work with Perl 5.004, and so it -# would be a Bad Thing for the CPAN module to grab it and replace this -# module. Therefore, we set this module's version higher than 2.0. $VERSION = '2.13'; require Exporter; ==== //depot/maint-5.10/perl/lib/File/Copy.t#4 (xtext) ==== Index: perl/lib/File/Copy.t --- perl/lib/File/Copy.t#3~34522~ 2008-10-20 02:38:51.000000000 -0700 +++ perl/lib/File/Copy.t 2008-12-03 12:50:06.000000000 -0800 @@ -7,6 +7,9 @@ } } +use strict; +use warnings; + use Test::More; my $TB = Test::More->builder; @@ -48,7 +51,7 @@ copy "file-$$", "copy-$$"; open(F, "copy-$$") or die $!; - $foo = <F>; + my $foo = <F>; close(F); is -s "file-$$", -s "copy-$$", 'copy(fn, fn): files of the same size'; @@ -76,7 +79,7 @@ unlink "copy-$$" or die "unlink: $!"; require IO::File; - $fh = IO::File->new(">copy-$$") or die "Cannot open copy-$$:$!"; + my $fh = IO::File->new(">copy-$$") or die "Cannot open copy-$$:$!"; binmode $fh or die $!; copy("file-$$",$fh); $fh->close or die "close: $!"; @@ -85,7 +88,7 @@ unlink "copy-$$" or die "unlink: $!"; require FileHandle; - my $fh = FileHandle->new(">copy-$$") or die "Cannot open copy-$$:$!"; + $fh = FileHandle->new(">copy-$$") or die "Cannot open copy-$$:$!"; binmode $fh or die $!; copy("file-$$",$fh); $fh->close; End of Patch.