Some PM nodes on writing modules for the CPAN:
- How to make a CPAN Module Distribution
- Simple Module Tutorial
- Josť's Guide for creating Perl modules
- Writing Solid CPAN Modules
- Best Module Starter?
And some external references:
- Guide to Creating Perl Modules by Ken Williams
- Perl Module Mechanics by Steven McDougall
- Making Perl Reusable with Modules by Andy Sylvester
- Writing Perl Modules for CPAN, book by Sam Tregar (can be freely downloaded from a link on this page)
- Making New Distributions by brian d foy (using Template Toolkit)
Before releasing your CPAN module, choose a module name and design an interface based on the general references above and on your own ideas, then post it here or on the email@example.com mailing list, requesting feedback. It is vital to focus on interface early because once your module is released, any change you make to its interface will break your existing user's code (by contrast, anything else can be easily fixed in later releases).