Creating Perl Modules

G. Wade Johnson did a talk on some of the modules that make building a Perl module easier.

The Module::Starter module was created by Andy Lester to make creating modules a little easier. The previous standard method was designed for creating XS-based modules and had a somewhat arcane interface. Module::Starter provides a script named module-starter, which provides a straight-forward interface for creating CPAN-ready modules. The Module::Starter::PBP module extends Module::Starter to support the recommendations from Perl Best Practices by Damian Conway.

Anyone creating a module for reuse should be familiar with Test::More for generating tests for their modules. If you have installed a module from CPAN, you have seen the results of the tests when executing make test. The actual results of the testing would be much more verbose without the help of Test::Harness. This module takes the output of a set of Perl tests and summarizes them nicely. This is the output you normally see from make test. Test::Harness also provides a utility script called prove which applies Test::Harness to the scripts listed on its command line.

The final module on the list was Perl::Critic. This module provides a script perlcritic that tests your code against the guidelines described in Perl Best Practices. This module supports a configuration file for customizing the importance of the various rules. This allows you to specify which practices you want to follow and simplifies checking your code.