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

NOT NEW but confused - set cpan paths from the start

by hput3 (Initiate)
on Apr 10, 2017 at 22:21 UTC ( [id://1187590]=perlquestion: print w/replies, xml ) Need Help??

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

Masters and students,

Please bare with me as I know this topic has been rather well trodden. So well that one finds lots of confusing hits on google some are well dated as well.

I want to know how to manage either CPAN or CPANPLUS such that From the first startup it opens on /usr/local/cpan and does all work there, with installations at /usr/local/lib/perl5/[...]

I'm thinking one could create the requisite config with all the correct info, paths etc in place so that when cpan opened, it would find the pre-made config and know just what to do. Never creating a `~/.cpan' at all.

A sort of final word for Apr 2017 exactly which items need adjustment, and what they should say.

I have root if that makes a difference.

Replies are listed 'Best First'.
Re: NOT NEW but confused - set cpan paths from the start
by 1nickt (Canon) on Apr 10, 2017 at 22:30 UTC

    Yes, use Perlbrew!

    The way forward always starts with a minimal test.

      Why use perlbrew when you can use cpan/cpanm/cpanp directly? esp if the default perlbrew configuration won't work for the OP?

        Why use perlbrew when you can use cpan/cpanm/cpanp directly?

        Because the default perl usually comes with the system (at least on Unix systems). And quite often, the system depends on that perl version and configuration. Slackware is a rare exception: It comes with a quite recent perl version, but it does not depend on Perl. For other Linux distributions and other Unix systems, you better use the package manager (rpm, apt, whatever - RTFM) to install perl modules from system packages instead of installing from CPAN. If you want to use the latest versions of some perl module, better install an independent perl, e.g. using perlbrew or by compiling perl manually. This way, modules "too new" for the system won't interfere with the system perl.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re: NOT NEW but confused - set cpan paths from the start
by Anonymous Monk on Apr 10, 2017 at 22:25 UTC
    use perlbrew!
Re: NOT NEW but confused - set cpan paths from the start
by Anonymous Monk on Apr 10, 2017 at 22:24 UTC
    hehe, the old answers work just use them

      Anonymous Monk wrote:

      "hehe, the old answers work just use them"

      There is a rather hefty problem with that approach. It appears there are more than one answer for things... many seem to be in direct conflict, and I know (from experience with this) it is possible to make quite a mess of things experimenting.

      There must be an example somewhere of a config document that does something similar to what I requested. Or at least an experienced someone that could supply the correct config off the top of their head.

      If someone felt like posting such a document... it would be a great relief.

        ...

        Most answers pull solutions directly from the documentation

        If you're going to mention answers you should link them

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1187590]
Approved by beech
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-25 07:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found