A Perl script and a Perl module are using `use lib` and referencing the same module
- by miss_a
I have a Perl script that is using two modules. The first module also uses the second module.
If the the first module does use lib 'dir1', and the script does use lib 'dir2':
module1.pm
use lib "dir1";
use module2;
script.pl
use lib "dir2";
use module1;
use module2;
which directory is being used by the first module? Does the script's use lib, 'dir2' override the use lib, 'dir1' in the first module, or do they have different scope?