At 11:38 -0700 27/07/2011, Noah wrote:

...this is a beginners question. I am trying to figure out the best cpan strategy for OSX. what is the best installation option for installing a cpan module to mac osx? I cant find the module in macports or fink packages.

I did download it and attempting to install manually but found I have a bunch of prerequisites that are not found. Is there a way to automate their installation. Should I be looking to do this entire perl module installation with installing cpan through perl directly?

Yes, provided you are using the Perl Apple installed or, which is most unlikely from what you have said, a version you have installed in /usr/local.

Make sure you have installed the Developer Tools from your Mac OS X disks, without which you won't be able to compile the modules.

Then, in Terminal, type

sudo cpan

and you will be asked for info needed to set up CPAN for use. You can choose to have prerequisites installed for modules, and I think this is the default.

Once you are set up, then installing modules is very straightforward. Just type sudo cpan and then

install Some::Module

When you have finished with CPAN make sure always to do




To exit to the bash shell otherwise you will have problems with a locked file.


Reply via email to