http://www.perlmonks.org?node_id=1058580


in reply to CPAN Useless on OS X

A few questions for you first ... Do you have `make` installed, a compiler, and the "BSD subsystem"? (I assume MacOS is still calling it that .. I'm not running 10.8.x). If you install Xcode through a regular package (not as an app), it should prompt you for what components you want to install. You must select 'BSD subsystem' or you won't have a perl.h and other important header files. You'd still be able to install pure perl programs (assuming you have `make`, or they're using Module::Build, but the majority of modules will fail).

The only way that I know to ensure that CPAN is truly clean is to clear out the installed libraries, and start over. (it had been /Library/Perl, but I think they've moved it in either 10.7 or 10.8). You can force a reconfigure from the cpan shell with `o conf init`.

Personally, I'd advise *against* messing with the system perl too much. I'd had a few times where Apple's patches screwed up one of the libraries that I needed, and I wasted way too much time trying to figure out what had gone wrong. Apple packages such outdated versions of perl that you're really better off just installing a fresh perl in /opt/ or /usr/local/, and keeping your libraries separate from what Apple distributes.