http://www.perlmonks.org?node_id=11109909

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, I am trying to migrate a server that uses cgi-bin and I am running into problems, because a "use" statement does not see the modules that it is trying to access. More specifically: Apache log error
AH01215: Can't locate Error.pm in @INC (@INC contains: /srv/www/Direct +/perl-lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/pe +rl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/sh +are/perl5 .
However:
/srv/www/Direct/perl-lib/Portal
give me:
ConfigError.pm DataIntegrityError.pm Error.pm JSTypeError.pm Page.pm SessionExpiredError.pm TypeError.pm DatabaseError.pm DebugError.pm FileSizeError.pm LockError.pm PermissionError.pm SystemError.pm
so, Error.pm exists! Furthermore, the login page that is producing the error has:
use lib '/srv/www/Direct/perl-lib'; use Portal::Page; use Portal::Error; use Portal::PermissionError; use Portal::DatabaseError; use Portal::SessionExpiredError; use DirectWeb::Database; use DirectWeb::Authenticator; use Error qw(:try); use CGI; use CGI::Cookie; use Log::Handler; use URI::Escape;
which, in my mind, means that the custom lib folder is declared explicitly, but @INC does not see it (?) Am I doing something wrong here?