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

When loading essentials into crouton apt-get, it is recommended that you install libtemplate-perl . It seemed like a fun idea, and I obeyed.

Reading this answer , I see that the traveler-traveler installs Plack and Starman through CPAN, but then use apt-get to install Dancer .

The minutes before reading the answer, I installed Dancer via CPAN. And it worked. It worked very well!

What happens differently when I install a CPAN package through a package manager other than CPAN? Are there any pitfalls that I should be wary of because my libtemplate-perl came from apt-get, or did my dancer come from CPAN?

+4
source share
5 answers

On Debian and Ubuntu, CPAN (utility /usr/bin/cpan) installs modules by default /usr/local/lib/. And debian packages store their files in /usr/share/perl5/and /usr/lib/perl5/.

You can also manually package any cpan distribution not available in your apt repositories. Easy with the dh-make-perl tool :

dh-make-perl --cpan Some::Module && cd Some-Module* && sudo debi

Also check out local :: lib and perlbrew .

+7

, , .. , , /usr/bin/cpan, , , .

, , , . , , crouton Perl, Python Lisp, , . Debian Ubuntu, , apt-get, cpan.

Perl, cpan, perlbrew / local::lib. , , apt-get.


, apt-get , Perl . , CPAN XML::LibXML , libxml2 ; CPAN , , . Debian , libxml2 , .

, XML:: LibXML Perl, cpan libxml2 apt-get. Perl, - , perlbrew local:: lib - . CPAN apt-get , Debian, , CPAN .


: TIMTOWTDI; -)

+7

, , , CPAN , , , ​​ , . , apt, Debian - , apt-get upgrade .

, , , . , . , .

+4

apt-get -

  • ,

  • , apt-get,

  • there are certain versions of packages checked for compatibility

disadvantages

  • not necessarily the latest version of packages

  • not all packages are available

+1
source

Installing apt-get is usually simpler and better than cpan due to dependencies.

If you are so lucky that you need SOAP :: Lite, for example, there are many dozens of dependencies and a single-line "apt-get install libsoap-lite-perl".

It is sometimes unclear how the Perl CPAN names are mapped to the package names of their repository, but the cap search is your friend.

0
source

Source: https://habr.com/ru/post/1548289/


All Articles