On Sun, Aug 10, 2008 at 9:30 PM, Aristotle Pagaltzis <[EMAIL PROTECTED]> wrote:
> * Graham Barr <[EMAIL PROTECTED]> [2008-08-11 03:05]:
>> On Aug 9, 2008, at 8:38 PM, Aristotle Pagaltzis wrote:
>>> * Todd Rinaldo <[EMAIL PROTECTED]> [2008-08-10 03:35]:
>>>> What alternatives do you recommend?
>>>
>>> See Tom Heady's reply on this thread.
>>
>> Which also as issues, albeit maybe fewer.
>
> Yes, it will fail in some very rare cases.
>
> However, it does so loudly and predictably.
>
> In contrast, FindBin tries to avoid failing by employing
> heuristics, and as we all know that is a fancy word for saying
> "it doesn't work." Unsurprisingly, when it fails, it fails
> silently with bizarre results – as it did for Gabor.
>
> Both failure modes are very rare, which means FindBin almost
> never needs to fall back on heuristics, which is why people tend
> to think I'm just nitpicking when I point out that it's broken as
> designed and should not be used. But I dislike software that can
> fail silently with bizarre results as a matter of principle. And
> when the heuristic is there to catch an almost irrelevant failure
> mode, its extremely disproportionate surprise potential just
> isn't worth it, IMO.
>
>> IIRC when FindBin was written there were some system where $0
>> was not a full path when the script was invoked via PATH, which
>> was why FindBin was implemented to do the PATH search. But that
>> was over a decade ago and I cannot remember which OS it was on,
>> so who knows if it is still in use today.
>
> I guess it might make some sense under those circumstances. But
> in that case it should have done the PATH search only on affected
> platforms, not everywhere. (Ideally it would specifically probe,
> if possible in any way, for whether the heuristic was needed.)
>
> Anyway, shoulda coulda woulda… that horse has long left the barn.


It sounds like there's a good case here for defaulting this off and
making path searching an option.

Reply via email to