Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

CPAN when not root

by edgreenberg (Acolyte)
on Dec 12, 2005 at 02:25 UTC ( [id://515937]=perlquestion: print w/replies, xml ) Need Help??

edgreenberg has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to install modules using CPAN under a hosting account. I have full bash access as a user, and lots of disk space. The system is freebsd.

I set LIB=~/www/cgi-bin since the system conveniently places . on perl's path, and I'm OK with installing things that are system independent.

It was necessary to cd to the ~/www/cgi-bin directory to run cpan, which was fine with me.

The process breaks down once things are installed in the freebsd directory under ~/www/cgi-bin, since CPAN can't find things there. For example, I can't get through Bundle::CPAN since Static::Util (I think) is under the freebsd directory.

Is there something I can do or set to make this go smoother? Also, for the CGI programs that will use the modules, any way to avoid editing each one to add the freebsd directory?

Thanks.

Replies are listed 'Best First'.
Re: CPAN when not root
by saintmike (Vicar) on Dec 12, 2005 at 02:32 UTC
Re: CPAN when not root
by Nitrox (Chaplain) on Dec 12, 2005 at 16:29 UTC
    Here's what I set in my CPAN config:
    LIB=/var/webeng/lib/perl PREFIX=/var/webeng/lib/perl
    and this is what I export before installing new modules (so CPAN knows whats already installed):
    export PERL5LIB=/var/webeng/lib/perl
    And finally, this is what I add to my code to use the "private" modules:
    use lib qw(/var/webeng/lib/perl);

    -Nitrox

Re: CPAN when not root
by esskar (Deacon) on Dec 13, 2005 at 01:48 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://515937]
Approved by Popcorn Dave
Front-paged by astaines
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-03-28 11:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found