Search code examples
perlmacoscpanmacports

A way to check the integrity of installed perl modules?


I have MacPorts and CPAN installed and I've only just found out that it's sort of bad to be using them both at the same time. I recently installed perl 5.13.9 via CPAN as it had some updated modules that a program wanted. That perl is installed in /usr/local/bin. MacPorts then updated its perl to 5.12.3 (/opt/local/bin) and complained that it couldn't complete the installation because some .3pm files already existed (e.g. cpan.3pm). I forced the install and MacPorts mv'd the offending files to a backup name. The next time I used CPAN it went through the configuration steps again so I'm wondering whether I need to mv those files back, and/or re/uninstall perl5.12.3/5.13.9. It would be nice to issue a command in Terminal to see/test if all the modules are still working correctly. And in general, I'm wondering how to combine CPAN and MacPorts safely.

Help?

On OS X 10.6.6.

edit

See below.


Solution

  • I fixed it! For reference for any other MacPorts/CPAN users:

    I ended up force-uninstalling perl5 and CPAN from MacPorts, and purging ~/.cpan. A sudo find /opt -name cpan (or perl5) should result in nothing but a couple of portfiles.

    Re-install perl5. I also ran a sudo port upgrade outdated.

    From then on, only install perl modules via MacPorts instead of CPAN. For instance, Digest::SHA is p5-digest-sha on MacPorts.

    For something only available on CPAN, use cpan2port by following the simple instructions here.