So lets say I have a dir called foo, and in that I have lib and bin. The scripts in bin need to stuff in lib. So naturally I do something like this:
#!perl
use strict;
use warnings;
use lib '../lib';
use Foo; # <-- comes from lib
But that means I have to be in the bin dir to run the script. Surely there is a better way. What's the Right Way to do this?
Edit: lot's of great answers below! But basically it seems like I am Doing It Wrong. The stuff in lib should go to some kind of system library (~/perl/site maybe?) and similarly the stuff in bin should do the same thing. Thanks guys!