When doing 'use lib' in a script that is saved somewhere within the directory under the path specified in PERL5LIB, it raises the following error:
Global symbol "%Config" requires explicit package name at /usr/lib/perl/5.10/lib.pm line 10.
Global symbol "%Config" requires explicit package name at /usr/lib/perl/5.10/lib.pm line 11.
Global symbol "%Config" requires explicit package name at /usr/lib/perl/5.10/lib.pm line 12.
Compilation failed in require at /path/to/lib/logger_test.pl line 5.
BEGIN failed--compilation aborted at /path/to/lib/logger_test.pl line 5.
PERL5LIB is '/path/to/lib'
When running logger_test.pl from the command line, the error doesn't happen.
$ cd /path/to/lib
$ ./logger_test.pl # no error here
I am unable to reproduce this. I created a script, put it in a directory which is in PERL5LIB and put a line use lib '/path/to/same/directory' inside. No problems with that.