in reply to Can't locate module in @INC

The script running and the modules "use"d are in the same directory (cgi-bin)

But is cgi-bin in your @INC array? Just because the script is in the cgi-bin directory it does not mean that this is the current directory (.) - that depends on how the web server runs. Add the directory that your modules reside in into @INC, and there are many ways to do that, try use lib 'cgi-bin-full-path'; in your code, or set the environment variable PERL5LIB. Is it a good idea to put modules into cgi-bin?

Replies are listed 'Best First'.
Re^2: Can't locate module in @INC
by rpike (Scribe) on Dec 09, 2009 at 15:24 UTC
    Right now the modules in cgi-bin bit doesn't bother me as much as having directories added to @INC outside the script (without having to use full paths). What are the various ways I can set the PERL5LIB environment variable? Are there ways to set it per session (reboot clears em) and a way to set it and have it remain persistent between reboots? Thanks for the posts guys.