Remove Perl modules from CPAN on Mac

2019-06-13 14:49发布

问题:

As far as I know it is required to run CPAN with sudo on Mac

sudo perl -MCPAN -e shell

to install new modules. Theoretically, a module can be removed by deleting it from the Perl folders.

My question is: Where are Perl modules put when installed from CPAN with 'sudo' and without 'sudo'? I installed BioPerl both ways and it seemed to work. Did I mess anything up by installing it with sudo and without?

Thank you for a little help in the confusing Perl world.

回答1:

You can see where a module got installed with perldoc -l <module>. That location is entirely dependent on your specific Perl installation, but you can see where the "standard" locations are by examining the @INC lines in the output of perl -V.