8. Module-Build and Module-Starter

Now let's tie everything together. When you download a Perl package from CPAN, there's a standard way to build and install it - perl Makefile.PL, make, make test and make install (or alternatively a similar process with perl Build.PL and ./Build ).

When creating packages of Perl code, it is preferable to make them capable of being built this way, even if they are intended for internal use. That is because packaging them this way gives you many advantages, among them the ability to specify CPAN (and in-house) dependencies, integrity tests, configurability in building and installation, and simplification of the preparation of system packages (such as .rpms or .debs).

In this section we'll learn how to prepare your own CPAN-like package of Perl 5 code using module-starter and Module-Build. There are some variations on this theme, but it should get you started.


Written by Shlomi Fish