Many CPAN hosted Perl modules are already packaged in Debian, so all one needs to do is the following:
- install dh-make-perl:
aptitude install dh-make-perl
- find the Debian package that contains the wanted Perl module:
dh-make-perl locate Chocolate::Belgian
- if the module has a matching Debian package, you should install it the usual way:
aptitude install libchocolate-belgian-perl
- otherwise, you have two options - read on
perl -MCPAN -e 'install Chocolate::Belgian'Another approach is to use dh-make-perl to automatically Debianize the module, and then install the resulting .deb package, like this:
cd /tmp dh-make-perl make --build --cpan Chocolate::Belgian # or: cpan2deb Chocolate::Belgian dpkg -i libchocolate-belgian-perl_0.01-1_all.debYou may run into errors due to missing Perl modules that the original missing module depends on. If this happens, you'll need to repeat the installation process for each missing module (again, either from an existing Debian package or using dh-make-perl).
I suppose the latter method makes sense if, like me, you only need a small number of non-Debianized Perl modules installed - I like being able to manage these modules with the usual Debian tools such as aptitude, instead of having to learn to effectively use yet another package maintenance tool.