From: Tim Bunce Date: Sat, 12 Dec 1998 23:08:51 +0000 (+0000) Subject: bug in pod2man search for perl binary [5.005_5x] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=206c6dae049d8c6fe2f9de084a5732c603b6c9d7;p=p5sagit%2Fp5-mst-13.2.git bug in pod2man search for perl binary [5.005_5x] To: perlbug@perl.com Message-ID: <19981212230851.A20578@ig.co.uk> p4raw-id: //depot/cfgperl@2544 --- diff --git a/pod/pod2man.PL b/pod/pod2man.PL index 4edf4f8..3c55d6e 100644 --- a/pod/pod2man.PL +++ b/pod/pod2man.PL @@ -318,7 +318,11 @@ $cutting = 1; # running an installed version of Perl to produce documentation from an # uninstalled newer version's pod files. if ($^O ne 'plan9' and $^O ne 'dos' and $^O ne 'os2' and $^O ne 'MSWin32') { - my $perl = (-x './perl') ? './perl' : ((-x '../perl') ? '../perl' : ''); + my $perl = (-x './perl' && -f './perl' ) ? + './perl' : + ((-x '../perl' && -f '../perl') ? + '../perl' : + ''); ($version,$patch) = `$perl -e 'print $]'` =~ /^(\d\.\d{3})(\d{2})?/ if $perl; } # No luck; we'll just go with the running Perl's version