PDA

View Full Version : Path to perl modules



pjfagen
11-13-2008, 04:14 PM
I want to use perl modules, both system installed modules and modules loaded from the cpanel. But my program fails no matter what path I try.
I've tried:

use MODULENAME;
use /home7/zingtree/perl; ("home7/zingtree" being my path)

and the suggested hostmonster code fails:

BEGIN {
my $homedir = ( getpwuid($>) )[7];
my @user_include;
foreach my $path (@INC) {
if ( -d $homedir . '/perl' . $path ) {
push @user_include, $homedir . '/perl' . $path;
}
}
unshift @INC, @user_include;
}

Also, after installing perl modules through the cpanel, they do not show up under my perl directory (the default).

Any suggestion?
Sometimes it's the simple things that frustrate.

duggoff
01-22-2009, 01:33 PM
If you found a solution, please post it here. I'm going to contact Hostmonster support and see if they can help.