CHAPTER 7
Great CPAN Modules
CPAN
HOUSES A WIDE VARIETY
of modules, from 10 line modules created by a
single author to massive 10,000 line multifile modules created by teams of pro
grammers. In fact, size and complexity are just one measure of variety in CPAN
modules. Along every conceivable axis design, documentation, implemen
tation, testing, packaging there exists great variety. CPAN is a virtual jungle
teeming with biodiversity.
And, like a real jungle, CPAN hosts a struggle for survival. Modules on CPAN
don't compete for food and shelter, but they do compete for equally scarce resources:
users and developers. Open source projects depend on users to grow and evolve.
Without a group of users and at least one dedicated developer, even the best
module on CPAN will soon find itself growing obsolete.
Of course, failure in this struggle isn't quite as perilous as it is in the real world;
modules that fail to find a user community are never killed.
1
Also, it must be
stressed that although modules are pitted in competition, their authors are not.
Nearly every CPAN author has a couple duds in their module directories, but that
doesn't detract from the success of their better works.
This chapter will examine the properties of a great CPAN module by exam
ining particularly successful modules. These modules have attracted large numbers of
users and are often supported by a number of programmers. Since CPAN doesn't
collect statistics on module usage,
2
I've chosen modules to look at based on my
own experience as a CPAN user. There are, of course, many excellent modules that
I didn't have the time to include.
One of the best ways to learn how to create great CPAN modules is to read
other great modules. Consider this chapter an annotated reading list and you'll be
well on your way.
What Makes a Great CPAN Module?
The essential question of this chapter seems simple. So simple, in fact, that there's
a single answer poised on the tip of every CPAN author's tongue: Great modules
come from addressing a common problem in a reliable and efficient way.
1. Although some people think they should be! As Lincoln Stein, author of the CGI and GD
modules, put it when asked what changes he would like to see in CPAN, Purge the cruft!
2. See the CPAN FAQ for an answer to the question, Why not?
165
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved