From 77644ee620b6a79cf8c538abaf7cd301a875528d Mon Sep 17 00:00:00 2001 From: markm Date: Sun, 2 May 1999 14:33:17 +0000 Subject: Maintenance releace 3 of perl5.005. Includes support for threads. --- contrib/perl5/lib/File/Copy.pm | 6 +++--- contrib/perl5/lib/File/Find.pm | 12 +++++++----- contrib/perl5/lib/File/Path.pm | 7 ++++--- contrib/perl5/lib/File/Spec.pm | 4 ++-- contrib/perl5/lib/File/Spec/Mac.pm | 4 ++-- 5 files changed, 18 insertions(+), 15 deletions(-) (limited to 'contrib/perl5/lib/File') diff --git a/contrib/perl5/lib/File/Copy.pm b/contrib/perl5/lib/File/Copy.pm index d0b3c89..e1da6b6 100644 --- a/contrib/perl5/lib/File/Copy.pm +++ b/contrib/perl5/lib/File/Copy.pm @@ -235,7 +235,7 @@ B Files are opened in binary mode where -applicable. To get a consistent behavour when copying from a +applicable. To get a consistent behaviour when copying from a filehandle to a file, use C on the filehandle. An optional third parameter can be used to specify the buffer @@ -274,7 +274,7 @@ C routine. For VMS systems, this calls the C routine (see below). For OS/2 systems, this calls the C XSUB directly. -=head2 Special behavior if C is defined (VMS and OS/2) +=head2 Special behaviour if C is defined (VMS and OS/2) If both arguments to C are not file handles, then C will perform a "system copy" of @@ -336,7 +336,7 @@ $! will be set if an error was encountered. =head1 AUTHOR File::Copy was written by Aaron Sherman Iajs@ajs.comE> in 1995, -and updated by Charles Bailey Ibailey@genetics.upenn.eduE> in 1996. +and updated by Charles Bailey Ibailey@newman.upenn.eduE> in 1996. =cut diff --git a/contrib/perl5/lib/File/Find.pm b/contrib/perl5/lib/File/Find.pm index 1305d21..7e67003 100644 --- a/contrib/perl5/lib/File/Find.pm +++ b/contrib/perl5/lib/File/Find.pm @@ -22,10 +22,10 @@ finddepth - traverse a directory structure depth-first =head1 DESCRIPTION The first argument to find() is either a hash reference describing the -operations to be performed for each file, or a code reference. If it -is a hash reference, then the value for the key C should be a -code reference. This code reference is called I below. +operations to be performed for each file, a code reference, or a string +that contains a subroutine name. If it is a hash reference, then the +value for the key C should be a code reference. This code +reference is called I below. Currently the only other supported key for the above hash is C, in presense of which the walk over directories is @@ -177,6 +177,8 @@ sub finddir { --$subcount; next if $prune; + # Untaint $_, so that we can do a chdir + $_ = $1 if /^(.*)/; if (chdir $_) { $name =~ s/\.dir$// if $Is_VMS; &finddir($wanted,$name,$nlink, $bydepth); @@ -194,7 +196,7 @@ sub finddir { sub wrap_wanted { my $wanted = shift; - defined &$wanted ? {wanted => $wanted} : $wanted; + ref($wanted) eq 'HASH' ? $wanted : { wanted => $wanted }; } sub find { diff --git a/contrib/perl5/lib/File/Path.pm b/contrib/perl5/lib/File/Path.pm index 39f1ba1..225ecab 100644 --- a/contrib/perl5/lib/File/Path.pm +++ b/contrib/perl5/lib/File/Path.pm @@ -88,7 +88,7 @@ in situations where security is an issue. =head1 AUTHORS Tim Bunce > and -Charles Bailey > +Charles Bailey > =head1 REVISION @@ -135,8 +135,9 @@ sub mkpath { } print "mkdir $path\n" if $verbose; unless (mkdir($path,$mode)) { - # allow for another process to have created it meanwhile - croak "mkdir $path: $!" unless -d $path; + my $e = $!; + # allow for another process to have created it meanwhile + croak "mkdir $path: $e" unless -d $path; } push(@created, $path); } diff --git a/contrib/perl5/lib/File/Spec.pm b/contrib/perl5/lib/File/Spec.pm index 5f3dbf5..616dcbc 100644 --- a/contrib/perl5/lib/File/Spec.pm +++ b/contrib/perl5/lib/File/Spec.pm @@ -91,7 +91,7 @@ but rather as class methods: File::Spec->catfile('a','b'); -For a reference of available functions, pleaes consult L, +For a reference of available functions, please consult L, which contains the entire set, and inherited by the modules for other platforms. For further information, please see L, L, L, or L. @@ -106,7 +106,7 @@ File::Spec::VMS, ExtUtils::MakeMaker Kenneth Albanowski >, Andy Dougherty >, Andreas KEnig >, Tim Bunce >. VMS -support by Charles Bailey >. OS/2 support by +support by Charles Bailey >. OS/2 support by Ilya Zakharevich >. Mac support by Paul Schinder >. diff --git a/contrib/perl5/lib/File/Spec/Mac.pm b/contrib/perl5/lib/File/Spec/Mac.pm index 4968e24..63a9e12 100644 --- a/contrib/perl5/lib/File/Spec/Mac.pm +++ b/contrib/perl5/lib/File/Spec/Mac.pm @@ -52,7 +52,7 @@ The fundamental requirement of this routine is that File::Spec->catdir(split(":",$path)) eq $path But because of the nature of Macintosh paths, some additional -possibilities are allowed to make using this routine give resonable results +possibilities are allowed to make using this routine give reasonable results for some common situations. Here are the rules that are used. Each argument has its trailing ":" removed. Each argument, except the first, has its leading ":" removed. They are then joined together by a ":". @@ -78,7 +78,7 @@ Under MacPerl, there is an additional ambiguity. Does the user intend that File::Spec->catfile("LWP","Protocol","http.pm") be relative or absolute? There's no way of telling except by checking for the -existance of LWP: or :LWP, and even there he may mean a dismounted volume or +existence of LWP: or :LWP, and even there he may mean a dismounted volume or a relative path in a different directory (like in @INC). So those checks aren't done here. This routine will treat this as absolute. -- cgit v1.1