in reply to use lib $lib_dir not working

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

Replies are listed 'Best First'.
Re^2: use lib $lib_dir not working
by karelb (Novice) on Apr 27, 2011 at 10:13 UTC
    @wind: Thanks a lot, that works for me.