Talk:CPAN

I attempted this procedure and had little luck. After setting and exporting PERL5LIB I tried perl -MCPAN -e shell and get an error about no permissions for the lockfile (makes sense siince it is looking in /root)> So, I made my own copy of MyConfig.pm and put it in my own directory (as the error message explained), and changed the variables to point to my dirs. It is still apparently only looking at the /etc/perl/CPAN/Config.pm and not my own as it is still trying to create a lockfile in  /root/.cpan Any ideas or am I just missing something obvious? --Russdell 21:26, 12 Sep 2006 (PDT)

i tried to install WWW:Mechanize, after I successfully installed CPAN, and got an error from extutils::install.pm telling me that it couldn't mkdir /usr/local/lib/perl. argh. i didn't say you had to, stupid piece of shit. so i changed the value of PREFIX in the makefile to point to my home directory and then it seemed to work. seemed to, because eventually turns out DreamHost already has WWW::Mechanize which i'm trying to install, so not sure if the installation in my home directory is helping any one. but there you have it. and this is the trouble with community-edited information, is that you have useful stuff, but snarky drunk people like me write it. Drunkenfilosofer

I tried the procedure and it worked wonderfully for me. You gotta be aware you're using your own cpan modules besides those provided by Dreamhost; therefore any script you run must know this. It's up to you to manually change your perl script to use your custom built modules. This is what I did to get otrs to recognize my compiled cpan modules: use lib '/home/myusername/perlmods/share/perl/5.8/'; --Jmontano 02:37, 3 December 2009 (UTC)

I tried these procedures and had a couple problems. First, manually configuring cpan nowadays involves answering a lot of questions and it's easy to miss the ones mentioned here. So I suggest: use the popular cpanm to install the modules. Unfortunately the cpanm module (App::cpanminus) was not installed on the server I am using (I will request it) so you first have to install it in your home directory using the method on this page. But afterwards, with cpanm you can do 'cpanm --local-lib ~/perlmods New::Module' without messing with any configurations. Second, the 'use lib' perl fragment is missing the "/home/username/perlmods/lib/perl5" segment, critical in my case.