Remove long-stading limitation from FindBin
authorMoritz Lenz <moritz@faui2k3.org>
Fri, 29 Apr 2011 17:44:52 +0000 (19:44 +0200)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 19 May 2011 04:35:43 +0000 (21:35 -0700)
commitce6c0f31778913bcbf7ccd245ab390dddd8a1361
treec1def5e0d75c0c7085457a82bec28b06cb554b83
parent15cf0830e4143a05328e27be76fb4144090ccbb4
Remove long-stading limitation from FindBin

The FindBin documentation states as a known bug that it will return
a wrong result if a script of the same name as the current one exists in
$PATH, and is executable.

This patch removes the functionality of searching through $PATH.
According to Graham Barr it was only necessary because the SysV shell on
Sun4OS4 was broken - a system where I can't imagine anybody wanting
(and successfully compiling) a modern perl.

On Linux this part wasn't necessary in the case of `perl -S scriptname',
tests on other platforms are very welcome.

As a side effect, this patch also removes some IO operations, speeding up
FindBin slightly.

This patch is based on discussions with Tina Müller.

Further "discussion": http://www.perlmonks.org/?node_id=41213
lib/FindBin.pm