I am having a look at cpanel v3 code for using a perl module after
installing it in your user directory (when not root):

my $homedir = (getpwuid($>))[7];my $n_inc = scalar @INC;for (my $i =
0; $i < $n_inc; $i++ ) {     if (-d $homedir . '/perl' . $INC[$i])
{         unshift(@INC,$homedir . '/perl' . $INC[$i]);         $n_inc+
+;         $i++;     }}

However this doesn't work, I came across a website

http://digitalpbk.blogspot.com/2007/09/cpanel-v3-perl-include-inc.html

that suggests it works with
.....

This script dint work for me much, so I manually included the include
locations into the BEGIN segment.


#! /usr/bin/perl -wBEGIN {unshift @INC,"/home/directory/perl/usr/lib/
perl5/site_perl/5.8.7/";}...

I am slightly confused as to how this is done

there are no email details so I cannot email him direct to find out
how it was done,

I tried amending

my $homedir = (getpwuid($>))[7];my $n_inc = scalar @INC;for (my $i =
0; $i < $n_inc; $i++ ) {     if (-d $homedir . '/perl' . $INC[$i])
{         unshift(@INC,$homedir . '/perl' . $INC[$i]);         $n_inc+
+;         $i++;     }}

so it says

my $homedir = (getpwuid($>))[7];my $n_inc = scalar @INC;for (my $i =
0; $i <
$n_inc; $i++ ) {     if (-d $homedir . '/perl' . $INC[$i]) {
BEGIN {unshift @INC,"/home/directory/perl/usr/lib/perl5/site_perl/
5.8.8/";}        $n_inc++;         $i++;
}}

still can't find the module

I also tried his suggested begin{...} include statements with and
without the above code and still no luck with perl finding the module,
even though the module is correctly installed in my directory, any
help to get perl to recognise the module will be greatly appreciated.
thanks in advance


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to