diff options
author | Craig A. Berry <craigberry@mac.com> | 2001-06-26 18:40:25 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-27 11:48:56 +0000 |
commit | 30db15becd51cfde87da4e4c700076871cd415ee (patch) | |
tree | 545eff60bd03ce9056acc49b425a7f14b6e7b790 /lib/File | |
parent | df1d22b882d5be6e009097608acb7b33e9fb8b43 (diff) | |
download | perl-30db15becd51cfde87da4e4c700076871cd415ee.tar.gz |
find.t hack for VMS
Message-Id: <a05101000b75f10cdc80f@[192.168.56.145]>
p4raw-id: //depot/perl@10983
Diffstat (limited to 'lib/File')
-rwxr-xr-x | lib/File/Find/find.t | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/File/Find/find.t b/lib/File/Find/find.t index e82aefd5e2..0dfd68caf8 100755 --- a/lib/File/Find/find.t +++ b/lib/File/Find/find.t @@ -20,10 +20,10 @@ else { print "1..78\n"; } use File::Find; use File::Spec; -if ($^O eq 'MSWin32' || $^O eq 'cygwin') +if ($^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'VMS') { - # This is a hack - at present File::Find does not produce native names on Win32 - # So force File::Spec to use Unix names. + # This is a hack - at present File::Find does not produce native names on + # Win32 or VMS, so force File::Spec to use Unix names. require File::Spec::Unix; @File::Spec::ISA = 'File::Spec::Unix'; } @@ -146,6 +146,7 @@ sub my_preprocess { print "# --preprocess--\n"; print "# \$File::Find::dir => '$File::Find::dir' \n"; foreach $file (@files) { + $file =~ s/\.(dir)?$// if $^O eq 'VMS'; print "# $file \n"; delete $Expect_Dir{ $File::Find::dir }->{$file}; } @@ -168,7 +169,7 @@ sub my_postprocess { # chdir, rmdir etc. # # dir_path() concatenates directory names to form a _relative_ -# directory path, independant from the platform it's run on, although +# directory path, independent from the platform it's run on, although # there are limitations. Don't try to create an absolute path, # because that may fail on operating systems that have the concept of # volume names (e.g. Mac OS). Be careful when you want to create an @@ -225,7 +226,7 @@ sub topdir { # # file_path() concatenates directory names (if any) and a filename to # form a _relative_ file path (the last argument is assumed to be a -# file). It's independant from the platform it's run on, although +# file). It's independent from the platform it's run on, although # there are limitations (see the warnings for dir_path() above). As a # special case, you can pass it a "." as first argument, to create a # file path like "./fa/file" on operating systems other than Mac OS |