The most used Perl modules are available as Debian packages.
However, Debian does not always provide the latest version we need and not all the existing CPAN modules are available.
At CPAN, we can find any module for almost everything and we can manually install it.
Debian Perl packaging Team has created a dedicated tool for Debian users : dh-make-perl.
To install it :
root@localhost:~# apt-get install devscripts dh-make-perl
Make sure the command is available :
fool@localhost:~$ which dh-make-perl
I decided to install the Perl module System2 :
fool@localhost:~$dh-make-perl –build –cpan System2
The program dh-make-perl will download directly from a CPAN mirror the module System2, check for any dependencies and create the corresponding Debian package.
The freshly created package is :
Install the package as root :
dpkg –install $HOME/.cpan/build/libsystem2-perl_0.84-1_all.deb
dpkg -l |grep -i system2
ii libsystem2-perl 0.84-1 like system(), but with access to STDOUT and STDERR.
Check now that the module is available through perl and perldoc commands :
fool@localhost:~$perl -MSystem2 -e1
For more information about Perl modules :