Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

perlbrew uses ~/.cpanm/ - why's that then?

by Caesura (Sexton)
on Nov 23, 2016 at 13:27 UTC ( #1176415=perlquestion: print w/replies, xml ) Need Help??

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

Hello Wise Ones,

I've installed perlbrew and installing some modules using cpanm (after doing : perlbrew install-cpanm) - then when I install a module from cpanm is moans about permission denied in ~/.cpanm/...

Fine, I've obvs used root for cpanm before, but why does perlbrew use anything outside it's own domain? I thought that was the point.

I can reset the permissions of ~/.cpanm/... to be me, but that seems a sledgehammer solution and poss not what non-perlbrew requires (if I use system perl to install, with sudo, then I'll get the same errors when using perlbrew later).

Cheers for any ideas,

Caesura

Replies are listed 'Best First'.
Re: perlbrew uses ~/.cpanm/ - why's that then?
by Dallaylaen (Chaplain) on Nov 23, 2016 at 20:34 UTC
    A reasonable question. However, I'm not sure how hard it would be to patch cpanm so that it uses a custom working directory. And it would require thorough testing on many systems, while running cpanm as root is probably not so common. Cpanm is for *not* having to run it as root after all!
      cpanm is for installing modules, where/how.... is all configurable, just like cpan and cpanp ....

      Thanks for your replies and yes, I could make it open to root and me, but I think I'd want a different collection of modules for each version of Perl in cpan (some new modules won't work on older Perls), so how would I patch cpanm to be different for all the Perls available in perlbrew?

      A bit of a faff when I thought perlbrew had self-contained environments.

      I'll look into it more...!

      Cheers,

      Caesura

        Honestly, I have no idea why perlbrew team decided to not patch cpanm in the way you describe. Maybe it was hard enough to patch it to work with perlbrew at all (mind you, the default cpanm doesn't).
Re: perlbrew uses ~/.cpanm/ - why's that then?
by Anonymous Monk on Nov 23, 2016 at 21:40 UTC

    How do you know its perlbrew?

      I called cpanm when using perlbrew, it was using /home/caesura/perl5/perlbrew/bin/cpanm and was trying to move stuff about in ./cpanm/.

      So, yes, deffo perlbrew I think!

      Cheers,

      Caesura

        What does perl -V output?
        So it was using /home/caesura/.cpanm ? Why is this a problem?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2022-01-18 05:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (52 votes). Check out past polls.

    Notices?