Msg#: 4361300 posted 8:08 am on Sep 12, 2011 (gmt 0)
I found at a couple places where it said you could create a folder for uploading modules to and to include the directory to the search list by adding use lib "/path/modules"; (path is a substitute word for the real path) and then to call them the same as other modules with use Module; or if it is inside a sub folder: use Subfolder::Module;
I downloaded a module from cpan and ftp'd it into the folder but when I try to run the page it says it can't locate the file although I see from what the error says that the path was included in the search. Is there something that needs to be done? I've tried different permissions on the directoris, files, etc., but keep getting the same message. Thanks
no, "/path/modules/Module/Subfolder/Module.pm" was symbolic. In the script is a real and complete path the the file and Module.pm is actually Paginate.pm. Sorry about that one. I saw that at a couple places and it was stated that you could call a module in that fashion if on a server host and the module was not installed and the host will not install it. I get the error listing all the paths searched(one of which is the one in "use lib "/path/modules";")but it tells me the pm file can't be found.
Msg#: 4361300 posted 1:16 am on Sep 13, 2011 (gmt 0)
Got it now. The paths were all okay and module was installed. Everything came together with the line rocknbil provided. Funny thing though, after it located the modules, just to see what would happen I commented out the line push (@INC,'/path/to/install'); and it still worked. Is that something that needs to be done just to establish the new directory or should I keep that line there and also in other scripts or will it now find the modules automatically. Thanks, I took a class in cgi scripting--it was a real low budget class using cgi-lib.pl. It didn't really teach much. I've learned so much more at this site and just doing searches than the scripting class taught---although it did get me off the ground. phranque--the only reason I have been using the readform sub is because the pagination won't work without it, even using cgi.pm. I hope to overcome that using a pagination module though. Can't thank you enough.
Msg#: 4361300 posted 8:52 am on Sep 14, 2011 (gmt 0)
Yeah, I think that was the problem--use Paginate was before use lib. I tried to put another module in and got this error: Can't locate loadable object for module Crypt::Camellia What does that mean? I looked everywhere and the only answers I could find were "did you install it properly"?. Unlike Paginate there is a whole lib of files in this one.