Some PM nodes on writing modules for the CPAN:
And some external references:
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 module-authors@perl.org
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).