MacOS – How to install CPAN modules from the command line on OS X

command linemacosperl

Simple question: How to install CPAN modules on OS-X like normal Linux/Unix way?

I just want to type in cpan something like install Perl6::Say for example.

Best Answer

Open the /Applications/Utilities/Terminal.app and you have a unix prompt.

Both perl and cpan ship with OS X so you have nothing to install unless you want a different version of them than ships with your particular version and build of OS X.

Air:~ me$ cpan Perl6::Say
Sorry, we have to rerun the configuration dialog for CPAN.pm due to
some missing parameters...  Will write to
 <</Users/me/.cpan/CPAN/MyConfig.pm>>