I seek your wisdom on the following issue.
I have a perl script that has a private library installed in the directory ../lib. However the perl script runs from a cronjob with its full path name and
use lib '../lib'
is therefore not working.
Hence I made the following construct to get the actual library path:
@dirs = split('/',$0);
$install_dir = join('/',@dirs);
$lib_dir = $install_dir."/lib";
So far so good, but any monk already can guess what the problem is going to be:
use lib $lib_dir
I understand why this is not working (compile time etc), but I have no clue how to solve this.