Today's post will focus on what CPAN is conceptually, to give an understanding of how it works, what it provides, and how to get the most from it. Watch this space for more practical posts once I've finished yammering about what CPAN is.
Just what the heck is CPAN, anyway? From its site, it's the "Comprehensive Perl Archive Network". Well, that's not very helpful. What's a Perl archive network, and why would people want a comprehensive one, at that?
Predominantly, CPAN is where Perl coders go to save time. As of this writing, there's 15614 (fifteen thousand six-hundred fourteen) modules published on CPAN, ready and waiting for anyone to use. They run the gamut from serious (Catalyst) to absurd (Acme::Magic::Pony) to an odd mixture of both (Quantum::Superpositions). To be sure, CPAN represents the core values of the Perl community--those officially documented and those that one with experience of the community can observe.
The first of these documented virtues is laziness. This is not the same sort of laziness that prevents one from doing any work at all, nor the sort of laziness that causes one to miss deadlines. Rather, it's the sort of laziness that one expresses when one solves a problem in a way that they'll never need to think about it again. Think "go away or I'll replace you with a very small [Perl] script". Anyone who's successfully held a job in systems administration knows that automation and laziness go a long way towards keeping one's sanity--to paraphrase the academic's creed, "script or suffer". CPAN enables Perl programmers to take this attitude and apply it to all the code they write.
The next is impatience. Of the three documented virtues, this one is closest to its common meaning. CPAN is about one thing (though a lot of other things are related to this): getting the job done. People publish to CPAN code they've found generally useful and that they hope others will find useful. Perl is a general purpose language in the most general sense of 'general purpose', and so CPAN is indeed comprehensive. There are packages for parsing HTML, writing GUI applications, and releasing software. Like every collection of software, it's not perfect. But even in the case that a library on CPAN gets one 80% of the way, that's 80% that someone else wrote and tested that the programmer doesn't have to write herself.
Last among the documented traits is hubris. In this usage, it doesn't refer to the excessive pride of Narcissus (Hellenic, not Roman). Rather, it refers to the desire to build great software that people will enjoy and admire. Those familiar with Eric Raymond's treatise on the hacker community will recognize the emphasis on meritocracy. CPAN is the Perl community's constantly evolving gift to itself, and arguably what most Perl coders are most proud of regarding Perl.
But there are other traits evident in the nature of CPAN. The most prevalent of these is a desire to share one's work with the community, free of charge, along with encouragement for others to do the same. CPAN has been around since approximately 1995, largely predating the widespread organized open source movement (though by no means entirely, of course; GNU probably has that honor), though has espoused the same ideals since the beginning.
In all of this, one underlying trait unifies Perl coders: we're all quite different people from many different backgrounds, unified and working together to help one another get work done. We're a very welcoming and generally open-minded lot. So please, won't you join us? It doesn't take much--just use our code with yours. I'll show how in this series of posts.




Leave a comment
All comments are moderated. Spammers don't waste your time