in reply to How to Add path to @INC

Installing a module to a user directory is covered in this faq. Basically, when compiling the module yourself, just add PREFIX=/directory to the command line when running Makefile.PL. I've never tried to do this through CPAN.pm, so I'm not sure if you can do it that way. Once you've installed the module, you have a number of options for telling Perl where to look for it. First, like you've heard, is to add the path to the @INC variable via something like push @INC, "/directory";. My preferred method is insteaduse lib "/directory;, which lets Perl check for the module at compile time and probably save you some headaches down the road. There's also an environment variable to do the same thing, but I've never used that, and I'm sure someone else will suggest it ;-).