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.
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.