|The stupid question is the question not asked|
Understanding Perl / Brew Perl and Cpan on macOSby feumw (Acolyte)
|on Apr 02, 2020 at 09:36 UTC||Need Help??|
feumw has asked for the wisdom of the Perl Monks concerning the following question:
The title might be a little weird but I couldn't sum up better what I want to know.
So I'm working on a macOS. As war as I know /usr/bin/perl is the default perl which comes with the OS. Some people say it's bad and you can't get full usage out of it so they prefer to install perl again via homebrew - The Missing Package Manager for macOS (or Linux).. No matter which perl (default=/usr/bin/perl / or homebrew=/usr/local/bin/perl is "active" for me cpan stays on the same location (/Users/myusername/.cpan). I double checked both with perl -MCPAN -e shell aswell.
How does this work? Does cpan install the Modules into it's own directories and no matter which perl is active, perl is just allowed to access those folders?
On Stackoverflow I found an article about cpan-vs-mcpan-perl saying:
cpan installs for the perl in the shebang (#!) line of the cpan file.I'd have assumed I have different locations using perl -MCPAN -e shell.
Let's say I want to split my CPANs having one for the default and one for the homebrew perl. How can I do this?
And does reinstalling a new fresh and clean cpan mean just rm -rf /Users/myusername/.cpan?
I hope I can find some Wisdom here to clear up my minds. Thanks in advice.