diff options
author | Charles Lane <lane@DUPHY4.Physics.Drexel.Edu> | 2001-10-09 04:40:57 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-09 11:43:01 +0000 |
commit | ea05ec2d9411e82d008b2a0e92e7d66d6d9efb74 (patch) | |
tree | a088fbc1249cd20f122dbb4d34c10fb709b3e8d5 /lib | |
parent | 57939c21a7bbfd08ebde68e4827e5276031c17d9 (diff) | |
download | perl-ea05ec2d9411e82d008b2a0e92e7d66d6d9efb74.tar.gz |
File::Find test on VMS
Message-Id: <011009083426.17530f@DUPHY4.Physics.Drexel.Edu>
p4raw-id: //depot/perl@12375
Diffstat (limited to 'lib')
-rw-r--r-- | lib/File/Find/t/find.t | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/File/Find/t/find.t b/lib/File/Find/t/find.t index 0dfd68caf8..5ec3dd7744 100644 --- a/lib/File/Find/t/find.t +++ b/lib/File/Find/t/find.t @@ -18,16 +18,19 @@ BEGIN { if ( $symlink_exists ) { print "1..188\n"; } else { print "1..78\n"; } -use File::Find; -use File::Spec; -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 or VMS, so force File::Spec to use Unix names. - require File::Spec::Unix; - @File::Spec::ISA = 'File::Spec::Unix'; - } - +BEGIN { + use File::Spec; + 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 or VMS, so force File::Spec to use Unix names. + # must be set *before* importing File::Find + require File::Spec::Unix; + @File::Spec::ISA = 'File::Spec::Unix'; + } + require File::Find; + import File::Find; +} cleanup(); find({wanted => sub { print "ok 1\n" if $_ eq 'commonsense.t'; } }, |