in reply to Creating my own CPAN directory
To use CPAN to install modules in a library in your home directory, you need to set up a private CPAN working directory in ~/.cpan. Place a CPAN configuration file under ~/.cpan/CPAN/MyConfig.pm with all the correct paths for your home, scripts, and library. Set up the PERL5LIB env. variable to look in that library for modules. If you're hosting cgi, arrange for the server to look there, too.
That's all it takes. Here are a series of shell commands (mod version numbers and such) which will set it up for you in about five minutes:
I 've posted similar before, but it's always fresh.$ mkdir ~/.cpan $ mkdir ~/.cpan/CPAN $ cd ~/.cpan/CPAN $ cp /usr/lib/perl5/5.8.4/CPAN/Config.pm MyConfig.pm $ perl -pi -e's!/root/\.cpan!$ENV{HOME}/.cpan!' MyConfig.pm $ perl -pi -e'/makepl_arg/ && s!\]! PREFIX=$ENV{HOME}]!' MyConfig.pm $ echo "export PERL5LIB=${HOME}/lib/perl5/site_perl/5.8.4/i686-linux:$ +{HOME}/lib/perl5/site_perl/5.8.4" >> ~/.bash_profile $ source ~/.bash_profile $ cpan cpan shell -- CPAN exploration and modules installation (v1.7601) ReadLine support enabled cpan>
After Compline,
Zaxo
|
|---|