http://qs1969.pair.com?node_id=431855


in reply to José's Guide for creating Perl modules

Very nice. This tutorial covers some of the things I plan on covering when I finally get around to writing a tutorial based on Writing Solid CPAN Modules. Update: I just noticed How to make a CPAN Module Distribution and Simple Module Tutorial both of which look excellent.

In addition to strict and warnings, don't forget taint mode testing. Re coding style, Abigail's My coding guidelines is worth a read.

It's vital to choose a good interface first time. Once your module is released into the wild it may become practically impossible to change its interface; anything else can be fixed later. Two good nodes I've noticed re creating good interfaces are Ingy's "Swiss Army Light Sabre" - or, "how do you design your APIs?" and Often Overlooked OO Programming Guidelines. Any other good ones, please let me know. Update: I couldn't find any more, so I wrote one: On Interfaces and APIs.

Update: I expect TheDamian's upcoming book "Perl Best Practices" will have some sound advice on this subject.

  • Comment on Re: José's Guide for creating Perl modules

Replies are listed 'Best First'.
Re^2: José's Guide for creating Perl modules
by ian (Beadle) on Dec 06, 2007 at 08:51 UTC
    eyepopslikeamosquito said:
    Update: I expect TheDamian's upcoming book "Perl Best Practices" will have some sound advice on this subject.
    Indeed, TheDamian's book, or Perl Best Practices (PBP) has a whole chapter on modules (ch17, pg. 397). The first section in that chapter is on interface design.

    Update: There's an article that covers some of this by TheDamian called Ten Essential Development Practices.

    -- Ian Tegebo