Change 13526 by jhi@alpha on 2001/12/07 22:27:46

        which_perl: if File::Spec fails, assume "./" and hope for the best.

Affected files ...

.... //depot/perl/t/test.pl#21 edit

Differences ...

==== //depot/perl/t/test.pl#21 (text) ====
Index: perl/t/test.pl
--- perl/t/test.pl.~1~  Fri Dec  7 15:45:05 2001
+++ perl/t/test.pl      Fri Dec  7 15:45:05 2001
@@ -289,15 +289,17 @@
        # which is a bit heavyweight to do here.
        
        if ($Perl =~ /^perl\Q$exe\E$/i) {
+           my $perl = "perl$exe";
            eval "require File::Spec";
            if ($@) {
                warn "test.pl had problems loading File::Spec: $@";
+               $Perl = "./$perl";
            } else {
-               $Perl = File::Spec->catfile(File::Spec->curdir(), "perl$exe");
+               $Perl = File::Spec->catfile(File::Spec->curdir(), $perl);
            }
        }
        
-       warn "which_perl: cannot find perl from $^X" unless -f $Perl;
+       warn "which_perl: cannot find $Perl from $^X" unless -f $Perl;
        
        # For subcommands to use.
        $ENV{PERLEXE} = $Perl;
End of Patch.

Reply via email to