arc_of_descent has asked for the wisdom of the Perl Monks concerning the following question:
Hello All,
I'm trying to install Perl modules using CPAN.pm through a CGI script. FYI, I was able to install modules through the command line. Here, MyConfig.pm works as expected.
However, I'm aware that through the web, the script runs as user apache and looks for MyConfig.pm in apaches home directory. I don't have write access to apaches homedir, but I'm planning to install the modules inside a directory writeble to apache residing in my home directory.
What I've tried doing is modifying the Config hash inside the perl script like so:
use CPAN; use CPAN::Config; $CPAN::Config->{'build_dir'} = q[/home/rohan/.cpan/build]; $CPAN::Config->{'cpan_home'} = q[/home/rohan/.cpan]; $CPAN::Config->{'makepl_arg'} = q[PREFIX=/home/rohan/perllib LIB=/home +/rohan/perllib/lib/perl5];
Both, /home/rohan/.cpan and /home/rohan/perllib are writable by apache.
This does not seem to work. Any pointers will be very helpful.
Thanks for reading.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using CPAN through web
by tlm (Prior) on Mar 29, 2005 at 22:02 UTC | |
by arc_of_descent (Hermit) on Mar 29, 2005 at 22:28 UTC | |
by tlm (Prior) on Mar 29, 2005 at 22:44 UTC | |
by arc_of_descent (Hermit) on Mar 29, 2005 at 22:53 UTC | |
by tlm (Prior) on Mar 29, 2005 at 23:17 UTC | |
|
Re: using CPAN through web
by brian_d_foy (Abbot) on Mar 30, 2005 at 03:50 UTC | |
by arc_of_descent (Hermit) on Mar 30, 2005 at 08:45 UTC |