From: Benjamin Sugars Date: Tue, 27 Mar 2001 16:27:38 +0000 (-0500) Subject: Enable warnings in File::* (was: B::Terse and warnings) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b395063c4500baaa5d9b1c18d28abaadc275a05c;p=p5sagit%2Fp5-mst-13.2.git Enable warnings in File::* (was: B::Terse and warnings) Message-ID: p4raw-id: //depot/perl@9428 --- diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm index 297386f..1452243 100644 --- a/lib/File/Basename.pm +++ b/lib/File/Basename.pm @@ -135,7 +135,8 @@ BEGIN { -use 5.005_64; +use 5.6.0; +use warnings; our(@ISA, @EXPORT, $VERSION, $Fileparse_fstype, $Fileparse_igncase); require Exporter; @ISA = qw(Exporter); diff --git a/lib/File/CheckTree.pm b/lib/File/CheckTree.pm index 8b6ae08..35f7906 100644 --- a/lib/File/CheckTree.pm +++ b/lib/File/CheckTree.pm @@ -2,8 +2,9 @@ package File::CheckTree; our $VERSION = '4.1'; -require 5.000; +require 5.6.0; require Exporter; +use warnings; =head1 NAME @@ -49,6 +50,7 @@ our @EXPORT = qw(validate); sub validate { local($file,$test,$warnings,$oldwarnings); + $warnings = 0; foreach $check (split(/\n/,$_[0])) { next if $check =~ /^#/; next if $check =~ /^$/; diff --git a/lib/File/Compare.pm b/lib/File/Compare.pm index 667e7cb..9cf922b 100644 --- a/lib/File/Compare.pm +++ b/lib/File/Compare.pm @@ -1,7 +1,8 @@ package File::Compare; -use 5.005_64; +use 5.6.0; use strict; +use warnings; our($VERSION, @ISA, @EXPORT, @EXPORT_OK, $Too_Big); require Exporter; diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm index 24d1ffd..8757505 100644 --- a/lib/File/Copy.pm +++ b/lib/File/Copy.pm @@ -7,8 +7,9 @@ package File::Copy; -use 5.005_64; +use 5.6.0; use strict; +use warnings; use Carp; our(@ISA, @EXPORT, @EXPORT_OK, $VERSION, $Too_Big, $Syscopy_is_copy); sub copy; diff --git a/lib/File/DosGlob.pm b/lib/File/DosGlob.pm index 2b4d39a..aa9beb9 100644 --- a/lib/File/DosGlob.pm +++ b/lib/File/DosGlob.pm @@ -11,6 +11,7 @@ package File::DosGlob; our $VERSION = '1.00'; use strict; +use warnings; sub doglob { my $cond = shift; diff --git a/lib/File/Find.pm b/lib/File/Find.pm index 1e33f1e..ef3d241 100644 --- a/lib/File/Find.pm +++ b/lib/File/Find.pm @@ -1,6 +1,7 @@ package File::Find; use strict; -use 5.005_64; +use warnings; +use 5.6.0; our $VERSION = '1.00'; require Exporter; require Cwd; diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 0eb6128..82509c2 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -91,11 +91,12 @@ Charles Bailey > =cut -use 5.005_64; +use 5.6.0; use Carp; use File::Basename (); use Exporter (); use strict; +use warnings; our $VERSION = "1.0404"; our @ISA = qw( Exporter ); diff --git a/lib/File/stat.pm b/lib/File/stat.pm index 200af4e..aff5d03 100644 --- a/lib/File/stat.pm +++ b/lib/File/stat.pm @@ -1,7 +1,8 @@ package File::stat; use strict; +use warnings; -use 5.005_64; +use 5.6.0; our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); our $VERSION = '1.00'; diff --git a/t/lib/filecopy.t b/t/lib/filecopy.t index 3072c54..8412258 100755 --- a/t/lib/filecopy.t +++ b/t/lib/filecopy.t @@ -15,8 +15,6 @@ use File::Copy; for my $pass (@pass) { - require File::Copy; - my $loopconst = $pass*$tests; # First we create a file @@ -96,10 +94,6 @@ for my $pass (@pass) { and not -e "file-$$";; printf "ok %d\n", 11+$loopconst; unlink "lib/file-$$" or die "unlink: $!"; - - # warn sprintf "INC->".$INC{"File/Copy.pm"}; - delete $INC{"File/Copy.pm"}; - }