use FindBin; use lib "$FindBin::Bin/lib";
Should do.
Yes, use is executed at compile time, so an if/else would require extra care (for example a string-eval) to work, or useif.
(Chances are that somebody will step up and tell you why FindBin is a bad idea, but so far it always worked for me.)
In reply to Re: Perl module management
by moritz
in thread Perl module management
by andrewtaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |