in reply to Re^3: use lib qw(relative path)
in thread use lib qw(relative path)
This one is fine. But I prefer less keystrokes to make copy-paste more easy.
use vars qw($Bin $Script); BEGIN { ($Bin, $Script) = split /([^\/\\]+)$/, $0 } use lib $Bin . 'lib';
It works for Win, Unix/Linux. I don't care about Mac
UPDATE: It works on Mac too. see Re: Paths in Perl
|
|---|