"Perl for Perl Newbies" - Part 5 - Good Programming PracticesModule-Build and Module-StarterAdditional Resources

8.5. Additional Resources

Here are some additional resources regarding managing a CPAN-like distribution.

  1. ExtUtils-MakeMaker is Perl's older and now largely unloved distribution manager, which relies on generating makefiles. It was described by chromatic as a jumble of Perl which writes cross platform shell scripts to install Perl code, and you customize that by writing a superclass from which platform-specific modules inherit pseudo-methods which use regular expressions to search and replace cross-platform cross-shell code, with all of the cross-platform and cross-shell quoting issues that entails .

  2. Module-Install is a more modern and succinct wrapper around ExtUtils-MakeMaker that has gained some popularity. It ships its code (and the code of its extensions) under an ./inc directory in the distribution, which has known to cause some bootstrapping issues for co-developers who would like to collaborate on the code from its version control repository. Nevertheless, it may be worth taking a look.

  3. Writing Perl Modules for CPAN is a book by Sam Tregar, which has a free PDF download. It is somewhat out-of-date (only covering ExtUtils-MakeMaker), but may still be enlightening.

  4. Dist::Zilla is a high-level distribution generator, with many available plugins, that abstracts away a lot of the duplication within a module and across modules. It generates fully-functional distributions that can be shipped to CPAN and used normally. As with Module-Install, it may pose a problem to your contributors, especially if they have out-of-date versions of its CPAN modules installed, but it is a useful tool.

  5. A Perlmonks.org post titled “RFC: How to Release Modules on CPAN in 2011” goes to more coverage about the issues covered in this section.

  6. Jeffrey Thalhammer has prepared a talk titled “CPAN for Private Code” which gives the motivation for packaging Perl code in CPAN-like distributions, even if it is not intended for CPAN.

Written by Shlomi Fish