in reply to Re: use lib $lib_dir not working
in thread use lib $lib_dir not working
This is the solution I used to go with. However, I happened upon one of tye's rants in the CB a number of years ago, where he pointed out that FindBin is broken, and that you're better with File::Spec->rel2abs($0).
I actually have the following in one of my scripts:
Not necessarily the best way to do it, but close enough, I figure. And probably faster than FindBinuse File::Spec; use File::Basename qw(dirname); use Cwd qw(abs_path); use lib File::Spec->catdir(dirname(dirname(abs_path($0))),'lib');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: use lib $lib_dir not working
by tinita (Parson) on Apr 28, 2011 at 08:31 UTC | |
| |
|
Re^3: use lib $lib_dir not working
by tinita (Parson) on May 02, 2011 at 17:37 UTC | |
by tye (Sage) on May 03, 2011 at 03:36 UTC | |
|
Re^3: use lib $lib_dir not working
by Anonymous Monk on Apr 27, 2011 at 21:59 UTC |