HOW-TO: Packaging Perl CPAN Devel::Trace for Ubuntu Linux

Recently I ran into a situation where a Perl CPAN module I needed was not available in the Ubuntu repositories. Someone on IRC kindly showed me a slick Ubuntu package which is able to quickly produce Ubuntu .deb packages out of Perl CPAN modules! Here is what you need to know:

Using a developer computer (aka "play box") add the following packages:

$sudo apt-get install dh-make-perl build-essential

Next use dh-make-perl to package the needed CPAN module:

$dh-make-perl -e 'Michael Lueck <>' --build --cpan Devel::Trace

Note: Run the dh-make-perl as your normal ID, not as root / sudo!

Plop, plop, fizz, fizz, you end up with libdevel-trace-perl_0.10-1_all.deb in the current directory which may be used to deploy the needed Perl CPAN module to target machines.

Note: As of Ubuntu 12.04 (Precise Pangolin) this package is available through the native Ubuntu software repository. There is no longer need to follow these instructions to build one's own package of this Perl module. The package is named: libdevel-trace-perl