Chapter 12. Creating Your Own Perl Distribution
So far, weâve shown Perl as a language. The rest of this book starts your education for the Perl development process. Weâre almost to the point of making modules, but before we do that, we want to show how to create a Perl distribution. We donât need a distribution to create modules, but a distribution makes development easier; most of Perlâs tools are built around the concept of the distribution. Along with that, we want to test the code as we develop it, not when we think weâre done.
Perlâs Two Build Systems
A build system takes the files that we distribute and turns them into the files we actually install. It might compile files, insert configuration into code, or anything else the developer might want to do. Once itâs transformed the files, the builder installs them.
There are two common build systems in Perl. The ExtUtils::Makemaker
is built on top of make
,
a dependency management tool that originated with Unix
developers. These distributions use a Makefile.PL to control
the build. If we want to customize our build script, we have to know the
language of make
and we have to ensure
that our additions are portable. Although ExtUtils::Makemaker
is well supported, itâs at
the end of its life and no new features will be added. Still, many of the
CPAN distributions still use ExtUtils::Makemaker
so many developers continue
to use it because itâs stable and works well for common cases.
The newer system uses Module::Build ...
Get Intermediate Perl, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.