$ cat ~/tmp/pm_11124087/lib/XYZ.pm
package XYZ;
1;
####
$ cat ~/tmp/pm_11124087/test_lib.pl
#!/usr/bin/env perl
use strict;
use warnings;
use lib 'lib';
use XYZ;
##
##
$ ./test_lib.pl
$
##
##
$ cd ..
$ pm_11124087/test_lib.pl
Can't locate XYZ.pm in @INC (you may need to install the XYZ module) (@INC contains: lib /home/ken/...
##
##
$ cat ~/tmp/pm_11124087/test_lib.pl
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin;
use lib "$FindBin::Bin/lib";
use XYZ;
##
##
$ ./test_lib.pl
$ cd ..
$ pm_11124087/test_lib.pl
$