[quote]I figured out in bash that you can use:
This works during a temporary session but once I log out of bash, Dreamhost resets @INC.
I’m not following what you are trying to do. Dreamhost does not reset @INC, its just that @INC is builtin (when the perl executable was compiled) and then when the perl executable runs, it checks environment variables OR the lib pragma.
Are you getting errors when trying to execute the perl script as CGI? If so, just open the script, and add
use lib '/home/username/.perllib';For example, I have ~/lib/Company, and in my CGI scripts start with:
use lib '/home/username/lib';
use Company::Layout;Here is what the perl documentation says:
[quote]The array @INC contains the list of places that the do EXPR, require, or use constructs look for their library files. It initially consists of the arguments to any -I command-line switches, followed by the default Perl library, probably /usr/local/lib/perl, followed by ``.’’, to represent the current directory. If you need to modify this at runtime, you should use the use lib pragma to get the machine-dependent library properly loaded also:
use lib ‘/mypath/libdir/’;
Perl / MySQL / HTML+CSS