The following should work for you:
require lib; use Cwd qw(abs_path); use File::Basename qw(dirname); BEGIN { my $dirname = dirname($0); my $perl = abs_path("$dirname/../lib"); lib->import($perl); }
Here's a related question from earlier this year that will have other solutions: adding library directories relative to $0
In reply to Re: use lib $lib_dir not working
by wind
in thread use lib $lib_dir not working
by karelb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |