I'd use amonroy's basic approach but without chdir and with less verbiage.
use File::Spec::Functions qw( rel2abs catdir ); use File::Basename; use lib catdir( dirname( rel2abs $0 ), 'lib' );
Update: s/basename/dirname/
Makeshifts last the longest.
In reply to Re: use lib qw(relative path)
by Aristotle
in thread use lib qw(relative path)
by ccn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |