Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^3: use lib $lib_dir not working

by tinita (Parson)
on May 02, 2011 at 17:37 UTC ( #902546=note: print w/ replies, xml ) Need Help??

in reply to Re^2: use lib $lib_dir not working
in thread use lib $lib_dir not working

Now I think I understood the problem. It is about the PATH searching feature which is only invoked if the script is called via "perl". (Documented is a workaround to call "perl ./", though. I guess I never had problems with this because I usually call scripts with the full path or at least bin/ anyway.)

I was informed by Graham Barr that the PATH searching was done only because of a broken SunOS shell many years ago. I asked him because I suspected there must have been a reason for this.

Moritz and I discussed and came to the conclusion that there is no other case where this "feature" would actually be reliable and useful. So to keep the nice short usage of FindBin and to make it work correctly in all cases (except doing chdir() before, since it is actually impossible to obtain the correct path then) I submitted a report to perlbug:

update: link corrected, thanks

Comment on Re^3: use lib $lib_dir not working
Replies are listed 'Best First'.
Re^4: use lib $lib_dir not working (corrections)
by tye (Sage) on May 03, 2011 at 03:36 UTC

    You linked to the wrong bug. 89698 appears to be the bug you submitted (original link).

    And it appears that neither you nor Graham Barr actually understand what I find funny about searching PATH. It doesn't actually do anything useful (even in the case of a SunOS shell that could use relative paths). (For it to be useful, Perl itself would have to have a strange quirk, one that I'm pretty sure Perl never had.)

    - tye        

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://902546]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2015-11-26 20:30 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (707 votes), past polls