We've tried to install a Perl package unsuccessfully on a Mac and, as it turns out, you need to do a few things before you can run CPAN and install packages. Specifically, you need to install developer tools:
xcode-select --install
Once that installs, you should now be able to run cpan and install packages. Make sure cpan runs as a super user (ie sudo):