use lib relative pathnames - redux

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I'm trying to use libraries that are relative to the perl module or
script that's being called.

The below code will not work
use lib '../lib'
if I execute the script from a different drive letter, or from a
different directory in Windows.

I found this thread from 8 years ago:

Some people were going to use the following code:

use lib File::Basename::dirname(__FILE__) . "../lib";

Is there a more up to date solution?


Re: use lib relative pathnames - redux wrote:

Quoted text here. Click to load it

Don't know about up to date, but I used this one in the past:

John                   Small Perl scripts:
               Perl programmer available:
                                        I ploink :-)

Site Timeline