What Makes a Great CPAN Module?

Chapter 7 - Great CPAN Modules
by?Sam Tregar?
Apress ? 2002
has companion web siteCompanion Web Site

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.

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.



Writing Perl Modules for CPAN
Writing Perl Modules for CPAN
ISBN: 159059018X
EAN: 2147483647
Year: 2002
Pages: 110
Authors: Sam Tregar

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net