Least Appropriate Uses of Perl You've Seen

by James Turner

I've been asked to put together an article for someone on the most inappropriate (and appropriate) uses of Perl. My editor would like some real-life "Oh my god, you wrote WHAT in Perl" annecdotes. So if you've ever run across a use of Perl that made your skin crawl (in terms of just being totally the wrong language for the job), drop a line here or send me an email at turner@blackbear.biz



Dave Doyle
2008-01-06 20:06:29
I admit to finding this a bit distressing considering O'Reilly's past with Perl that you'd be asking for this. For any language, never mind Perl. It seems like it just invites language bashing.
James Turner
2008-01-06 20:54:39
Not at all, I'm a huge Perl fan. But every language has good and bad points, strength and weaknesses. That's the purpose of this article, to highlight both sides.


2008-01-08 06:41:08
You're missing the point. In the real world, IT developers are asked by managers to pull off some crazy hacks. You should be asking for some real-life "you wrote WHAT?!, but how did you even pull it off?" You'll find that Perl will be the preferred language for these hacks because it is so versatile. This is the strength of Perl, and what makes it superior to other languages.
Dave Doyle
2008-01-31 09:32:54
Well, congrats. You're article was as expected. If you've seen the comments at CIO I'm hope you've got plenty to think about.

Why did CIO offer this to you when you obviously have missed a few things about Perl? (I.E. CPAN and Catalyst)

If you don't know about it, don't write about it.

... and please don't tell me that the way I've been making my living (Web Applications in Perl) is outdated. Perl has many templating engines so I don't inline my code. It also has a simple web framework in CGI::Application. It has a mega framework that's quite comparable to RoR called Catalyst. There's other options like Jifty as well. We're not talking 10 year old code here. Minimal research would have found this out for you.

There's mod_perl to put the webapp in a persistent environment instead of Vanilla CGI. You can even use SCGI or FastCGI. No one is going to deploy a webapp as CGI these days.

Useless FUD. Hope the paycheck was good.

James Turner
2008-01-31 10:48:58
Mr. Doyle,
First off, I think you're making a few assumptions yourself. I've been using perl on a regular basis for (let's see...) more than ten years. And as far as CPAN goes, I think I can make the claim I have some familiarity with it...

There's a sickness in the open source community that I've been talking about for a long time. It has a couple of symptoms:

  • A huge chip that sits on the shoulders of anyone who "supports" a given tool or technology. "How DARE you imply that my tool isn't perfect for every usage out there. I won't bother to engage in dialog, I'll just attack you as a moron (or better yet, a paid stooge of my least favorite for-profit software vendor...)

  • Related to the above, an unhealthy identification of personal self worth with the tools that you are most comfortable with. I'd say I have more than most invested in Apache Struts, since I spent a good half-year of my life working with the 1.1 committers to button it up for release, but I'll be the first person to admit that Struts has warts and applications that it's either overkill or just not the right fit for.

    But a lot of tool supporters seem unable to accept that their pet toy isn't the perfect fit for everything, and see it as a reflection of their man (or woman)hood if someone suggests as much. It's like someone who really likes hammers, and if someone suggests a bottle opener would work better for getting the top off a beer, they feel as if they are being attacked personally

  • The mistaken belief that everyone is a full-time hacker who can spend infinite time tweaking tools to perform just the way they want.

The reality is that I was writing this for CIO, not for ONLamp (although I don't think I'd have changed a huge amount even if I had been writing for a more technical crowd.) I was asked to provide guidance on what the strengths and weaknesses of perl were, not to demonstrate that with work you can get perl to do just about anything you want.

I'm well aware of FastCGI, I built my first Apache site with it turned on way back around when I submitted that CPAN module (I think we even used it on the server that ran the Altavista search.) And I'm aware that there are great packages to do perl web servers. But I'll stand by my assertion that it's not the strongest language to do web sites in, or at least that compared to applications like sysadmin scripting, it's not perl's sweet spot. You disagree? Good, let's have a reasoned discussion about it, not ad-hominem attacks.

I also find it ironic that if you look at the article, I identify a bunch of things that perl is great for, and two I don't find it a great fit for. How that is an attack job on perl is beyond me. But I think there are a large portion of the perl community for whom anything but a "Why perl cures cancer and makes .NET look like a girly-man" article would be seen as inadequate.


Dave Doyle
2008-06-14 15:27:50
Well, congrats. You're article was as expected. If you've seen the comments at CIO I'm hope you've got plenty to think about.
Dave Doyle
2008-06-14 15:29:16