http://qs321.pair.com?node_id=1176451


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

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!
  • Comment on Re: perlbrew uses ~/.cpanm/ - why's that then?

Replies are listed 'Best First'.
Re^2: perlbrew uses ~/.cpanm/ - why's that then?
by Anonymous Monk on Nov 23, 2016 at 21:36 UTC
    cpanm is for installing modules, where/how.... is all configurable, just like cpan and cpanp ....
Re^2: perlbrew uses ~/.cpanm/ - why's that then?
by Caesura (Sexton) on Nov 24, 2016 at 10:44 UTC

    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).