On Thu, Aug 19, 2010 at 08:15, Kuba <snmp...@gmail.com> wrote: > Hi All, > How can I install additional perl modules on the linux if I don't have > root privileges on the box? > Can I install any modules to the $HOME directory and use them at my > scripts? > Thank you in advance, > Kuba snip
A combination of [local::lib][0] and [cpanm][1] makes this easy. You can install both with this [simple][2] command: wget -O- http://cpanmin.us | perl - -l ~/perl5 --prompt local::lib App::cpanminus You will need to add the following line to you profile (e.g. ~/.bash_profile or ~/.profile): eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib` That sets up all of the environment variables you need to access the modules and programs installed in ~/perl5. You may also want to write wrapper shell scripts for all of your Perl scripts to execute that line before trying to run them in cron or any other environment that does not source your profile. After logging out and back in, installing modules should be as easy as saying cpanm Module::Name You might want the following line to your profile. The cpanm program will use whatever options you put in the PERL_CPANM_OPT variable. export PERL_CPANM_OPT="--skip-installed --prompt" [0]: http://search.cpan.org/dist/local-lib/lib/local/lib.pm [1]: http://search.cpan.org/dist/App-cpanminus/bin/cpanm [2]: Simplicity is in the eye of the beholder. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/