开发者

A way to check the integrity of installed perl modules?

开发者 https://www.devze.com 2023-02-17 01:44 出处:网络
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 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 p开发者_如何转开发erl 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.


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.


I personally like to keep systems centrally managed, so i'd get rid of additional Perl and continue with one which is more closely integrated with system, so it is better to maintain.

If you need other Perl, you have to keep them separatley. About that i read here brian d foy great explanation

If you stay with one Perl, but you need to install your own modeles from CPAN and avoid conflicting with system ones, i'd suggest Chas. Owens's solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消