Is there any procedure to update the mylib.pm file with all Perl libraries?
I thought I covered this in my answer to your previous question
There is nothing wrong with your installation of mylib
. The issue is that it is looking for a directory called lib
either in the same directory as your Perl source file or in the directory above
If it finds one of these two directories, it adds it to the list of locations that perl searches for modules included by any subsequent use
statement. That is all it does. It is for use when you write your own Perl modules that need to be distributed along with the main Perl program file
From your previous question, one of your programs is /apps/cgi/kb/www_kb_search_new.pl
, so mylib
is looking for either
/apps/cgi/kb/lib
or
/apps/cgi/lib
and finding neither. That is the reason for the error message
Can't find lib in either /apps/cgi/kb or /apps/cgi
Since you say your program worked when you removed use mylib
, it seems that your program doesn't use any modules in these locations. This may be true of all your programs, in which case the solution should be to delete the use mylib
statement from all of them. This is easy to do with a simple shell command
Alternatively you could create one or other of these directories and leave it empty. That way mylib
would execute correctly, find the lib
directory, and add it to the search list, but no libraries would ever be loaded from there
I hope it's clear now?