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

Hi Guys,

I've just performed a rebuild that I have perfomed many, many times before, accepting the cpan defaults, and suddenly subsequent modules are not seeing earlier modules, like dependencies. This turns out to be because cpan is mysteriously putting the modules in ~/perl5/lib/perl5, which is not in @INC.

Not surprisingly, subsequent modules don't see their dependencies when installed this way.

"Can't find CPAN::Meta::Requirements.pm" is a common error message.

It looks as though I've not set up cpan correctly.

Just copying the modules to /usr/share/perl/5.14.2/ works for some modules, but clearly not for all.

How to set up cpan correctly?

I'm using Kubuntu 12.04 LTS.

Thanks for your help.

Regards

Steve.

Replies are listed 'Best First'.
Re: Why is cpan's option INSTALLDIRS=site putting modules in ~/perl5?
by Thalamus (Acolyte) on Jul 24, 2014 at 17:07 UTC
    I'm mostly using Redhat distros.

    On EPEL6 or older I use perlbrew a whole new install of perl into ~/perl5. On Fedora, however I can live with distro' perl wich is 5.18.2.

    My guess is that your on 5.14.2 from your post. I would do a 'mkdir ~/perl5' - then download local::lib and manually install it from the tar. 'perl Makefile.PL –bootstrap ; make test ; make install'.
    I tend to favor cpanm so then I run 'curl –k -L http://cpanmin.us | perl – App::cpanminus'. In .bashrc I add two ENV. PERL5LIB=~/perl5/lib/perl5 and_CPANM_OPT=–local-lib=~/perl5.

    Hope this helps.
Re: Why is my cpan configuration?
by Anonymous Monk on Jul 25, 2014 at 01:35 UTC

    How to set up cpan correctly?

    How is it setup currently? What is your cpan configuration?