Chapter 7
How do I know what's on the tip of every CPAN author's tongue? I don't really,
but I do know about a representative sample. I sent a set of questions to 30 of
CPAN's most prolific authors. Their answers, for which I am very grateful, guided
me in my quest for CPAN greatness. See the Acknowledgments at the front of the
book for a full list.
But back to their single overwhelmingly shared sentiment that great CPAN
modules come from high quality solutions to common problems. This has the
ring of truth to it; after all, if success is partially measured by the size of the user
community, then solving a problem that many users have is certainly a good start.
And the quality of the module itself is also an obvious factor. If a module isn't
reliable or doesn't perform well, then other developers will be tempted to create
alternative implementations that will compete for user attention.
That said, it is my premise that there additional factors at work. I think the best
CPAN modules certainly solve common problems and provide reliable, efficient
solutions. However, they also encourage extension, allowing users to develop add
on modules in response to their particular needs. Furthermore, great modules are
invariably supported by clear documentation with plenty of examples. Finally,
great modules must possess the ability to grow over time to meet the changing
needs of their users.
Some of the purported attributes of a great module are not necessarily accurate.
For example, some commonly heard advice is to never create a new module that
does the same job as an existing module. However, as I'll show in the upcoming
sections, many of CPAN's most successful modules began their lives as better
implementations of already solved problems. That said, if you're going where
others have gone before, it makes sense to ensure that your solution really will be
a better one. The only way to do that is to take a close look at the competition
give them a try and read their code before you set yourself the task of replacing them.
CGI.pm
The CGI module, often written CGI.pm to distinguish it from the standard it sup
ports, is the granddaddy of successful CPAN modules.
3
Perl is the most popular
environment for CGI programming,
4
and CGI.pm is the most popular way to go
about it. CGI.pm was created by Lincoln Stein
5
as a Perl5 implementation of the
facilities provided by the venerable Perl4 library cgi lib.pl. It leveraged the new
3. So successful, in fact, that it's now included with Perl! But it was once a CPAN module, so I
feel justified including it here.
4. Otherwise known as Web programming. CGI, or Common Gateway Interface, is used by
programmers to create interactive applications for the Web.
5. See Lincoln Stein's site at http://stein.cshl.org/.
166
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