in reply to Perl module management

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.)