Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

purpose of installing a perl module with apt-get instead of cpan

While loading necessities into my crouton, apt-get recommended that I install libtemplate-perl. This seemed a jolly idea, and I obeyed.

Reading this answer, I see a fellow traveler install Plack and Starman via CPAN, but then use apt-get to install Dancer.

Minutes before reading said answer, I had installed Dancer via CPAN. And it had worked. It had worked real good!

What happens differently when I install a CPAN package via a non-CPAN package manager? Are there pitfalls I need to be wary of because my libtemplate-perl came from apt-get, or my Dancer came from CPAN?

like image 202
Cody Hess Avatar asked Jul 14 '14 00:07

Cody Hess


1 Answers

On Debian or Debian based distros like Ubuntu, CPAN (/usr/bin/cpan utility) installs modules into /usr/local/lib/ by default. And Debian packages keep their files in /usr/share/perl5/ and /usr/lib/perl5/.

It's a better way to choose dh-make-perl tool to package any CPAN distribution not available in your apt repositories, to avoid making mess (serious risk of conflict between apt and CPAN):

dh-make-perl --build --cpan Some::Module
dpkg -i some-module*.deb

Also check out about local::lib and perlbrew.

like image 64
Chankey Pathak Avatar answered Sep 28 '22 00:09

Chankey Pathak