I used Perl as my primary programming language for more than a decade. When people would ask my why, I would give them two answers: First of all, because Perl enabled me to code extremely quickly, thanks to all of its built-in features. And secondly, you could be sure that someone had already implemented part of your solution, and had made their code available via the Comprehensive Perl Archive Network, known as CPAN.
I'm not the only Perl hacker who has moved onto other languages in the last few years. The Ruby and Python communities, as well as those from some languages as new as Erlang, Groovy, and Scala, and as old as Lisp and Smalltalk, have managed to attract many people who would have programmed in Perl only a few years ago. The large and active communities around the Web frameworks Ruby on Rails and Django have attracted many Perl programmers to those languages. (And yes, there is a Perl version of Rails known as Catalyst, but it doesn't have nearly the same momentum as Rails does, if only because of the relatively small size of the community using it.) The slow rate of development on Perl 6 has also been a factor, effectively encouraging programmers to look elsewhere.
Nevertheless, CPAN continues to be one of the strongest and most active repositories for open-source libraries around. These libraries, many of which are packaged as Perl objects, do everything from communicate with Amazon's various Web services (including EC2 and S3), to verify credit cards, to manipulate images, to parse XML, to implement SSL. Because of the somewhat chaotic nature of CPAN, many of these functions are implemented in multiple modules. So there are several dozen modules for parsing XML and another few dozen templating systems, for starters.
Indeed, looking at the CPAN site is a great way to realize that Perl is far from dead. Looking at the "recent updates" page on CPAN shows that each day over the last week, there were more than 30 updates or new modules uploaded to CPAN. The fact that you can then use the CPAN site to find a module that suits your needs, to read its documentation, or even to rate it, has created a community that is almost unknown for other languages. Ruby's "Gems" extension system is an increasingly important part of the community, but it hasn't yet reached the level of CPAN.
In the past, some people -- especially consulting clients unfamiliar with open-source software -- have asked me how I can incorporate third-party libraries into programs that I write, without knowing anything much about the author or the code itself. That's probably the most amazing thing about CPAN: While not every module is written well, it's extremely rare to find one that is truly destructive or problematic. I have been using CPAN modules in my code for more than a decade, and I have found far more bugs than security issues. Nearly every time I reported a bug to the module's author, they were gracious and helpful, and released a new version with the fix a short time afterwards. (When this didn't happen, I could modify the source code to fix the problem -- or use an alternate module from CPAN that had roughly the same functionality.) There is even a CPAN testing service (CPANTS) which is attempting to set up automatic testing for CPAN modules, as an additional layer of quality assurance.
If you thought that Perl was dead, you owe it to yourself to take a look at the latest entries on CPAN. Not only might you be pleasantly surprised by what you see, but you might be inspired to either write your next program in Perl, or to port one or more of these CPAN modules to another language.
Comments
Add CommentBy an anonymous user on Jun. 19, 2008
Let's face it - the more language are available, the higher the competition will be.
Third party addons were not my highest priority for ANY language, because I will write a lot of code in that language anyway, and so it does not matter much if someone else already has a solution or not - because I will write a lot of code in that language anyway, as said :)
By an anonymous user on Jun. 19, 2008
One more thing:
"If you thought that Perl was dead, you owe it to yourself to take a look at the latest entries on CPAN."
As I wrote above that perl will have a lot more competition today, only time will show how many new people will use ANY given language. Take PHP for example. A horrible language but it is used for web tasks a lot, despite perl being there. CPAN did not change much that PHP became popular... to be honest I think the perl community think CPAN is overly important but neglect other aspects of the language too much.
By devsmt on Jun. 19, 2008
cpan is the strenght point of perl and perl comunity, php pear has an high standard to accept packeges but that way it failed to attract a big comunity. perl as a language has maybe something more than php but php is simpler and the winner at the end was php. if you want a big comunity, you must be accessible and "easy". ruby, python and perl too, are elitarian tools actracting seasoned developers with unuseful complexity, but what people is looking for are valuable abstractions and simplifications.
By Khurt Williams on Jun. 19, 2008
May a time I have been given a problem to solve with a very tight deadline and no time to "write a lot of code". CPAN has saved my ass numerous times. It's importance is not overstated. Maybe anonymous likes wasting his employers/clients time by writing his own FTP and LDAP code instead of just using a library.
By /I3az/ on Jun. 19, 2008
And the quality of CPAN just keeps on improving. Over last few years there's been some real gems produced like Moose & DBIx::Class. And keep an eye on POE & Catalyst which are maturing very nicely now.
Perhaps we're in the golden age for CPAN!?
By an anonymous user on Jun. 25, 2008
Definitely looks at Moose. Stevan Little, the author of Moose, made a tour of other languages about and took and incorporated the best part of all of them.
I get the cleanliness of Python, the meta object programming of CLOS, and the extensibility of CPAN. Together with the MooseX packages, the time to develop clean production quality code has gotten even less with Perl.
Share Your Comments
Trackback URL
http://ostatic.com/trackback/165540