You will need to show the relevant code that produces the problem.
One easy way of producing what you seem to describe would be something like the following:
BEGIN {
@INC= ();
};
use lib '/home/foo/perl-lib'; # will die with "module lib.pm not found
+"
My advice is to just not do that, or to review require, which allows runtime loading of files. |