New Perl Books

I noticed that the O’Reilly stand at Opentech on Saturday had a few new Perl books. I think that a couple of these books are particularly important.

Over the last few years I’ve heard a lot of people saying that Perl isn’t suitable for large scale programming projects as it doesn’t constrain programmers in the same way as languages like C++ or Java. I don’t, of course, agree with this but it seems to be a popular opinion. It’s therefore good to see a couple of books that are firmly aimed at dispelling this belief.

Perl Best Practices by Damian Conway does exactly what the title suggests. It presents over 250 guidelines that will help you write “better” Perl code – where “better” means more readable, more reuseable and easier to maintain. If you’re a manager trying to cope with a multitude of coding styles from different Perl programmers, then buy them all a copy of this book and call it the departmental coding standards. If you’re a programmer whose manager is telling you that your department is moving to Java because Perl code is so hard to maintain, then lend him your copy of this book to persuade him that Perl code can be just as robust as Java.

Whilst Perl Best Practices will probably get most of the publicity, I actually think that Perl Testing: A Developer’s Notebook (Ian Langworth and chromatic) is just as important. Testing is a very hot topic in software development right now and the Perl community has built up a testing framework that is second to none. This book is a pragmatic guide to getting the most out of that framework.

Between them, these two books should go a long way towards countering any arguments about Perl not being an appropriate language for writing enterprise applications.

And that, as far as I’m concerned, has to be a good thing.

4 comments

  1. Having worked with Java for about seven years in total, I think it’s ended up being pretty shocking for building enterprise apps. It’s just not robust. The whole concept of app servers just doesn’t work in practice, they’re all buggy in different ways. The Keep It Simple Stupid people need to get in and start kicking some ass!Maybe it’s time for a Perl renaissance. I don’t know what the testing framework is that you refer to, but it needs to get a good name and start branding itself! (Most computer people have probably heard of JUnit.)I have to say that I did love the IDE support that you get using Java. IntelliJ IDEA is stunning. A lot of Perl developers seem to just use a text editor, and maybe you could argue that this is all you need, but I found heaps of useful features in IDEA, so maybe the Perl community could learn some stuff here.

  2. The Perl testing framework doesn’t have a name. The Perl community doesn’t have much time for trivial things like marketing.What it does have is a powerful framework for testing just about any kind of Perl code that you can throw at it. Whilst JUnit (and its ports to other languages) is good, it rather breaks if you’re trying to test something that isn’t object oriented. That’s probably fine in a language that encourages OO programming above all else, but Perl supports a number of different progamming paradigms and the Perl testing framework supports pretty much all of them.We do have a port of JUnit which is called PerlUnit, but it’s pretty much ignored by everyone as it doesn’t tie in with the rest of the framework. Perl programmers will tend to do OO style unit testing using Test::Class which does work with the rest of the framework.I’m saving my comments on IDEs for a separate post.

  3. “The Perl community doesn’t have much time for trivial things like marketing.” Surely some mistake! If the language isn’t in the top of programmers’ minds, then they will be seduced by Java or .net and won’t use Perl. Then it’s a downward spiral, with less organisations using Perl, meaning there’s less Perl programmers required, meaning less converts to spread the word and get more organisations using it, etc.I’m currently working with physicists and mathematicians, mostly academics, on quantum computing. What I find amazing, and baffling, is that they mostly don’t know – and mostly don’t even care – what their work will be used for. It’s incredible! It’s such an insular community.There might be a parallel with Perl here. The Perl folks all claim that Perl is awesome, for a multitude of reasons, and yet there seems to be no real push to get it considered as a serious programming language by most people. This is a shame.I suppose Java was helped by Sun and IBM supporting it in various ways. Perl needs some more big-time champions. I’d have thought that O’Reilly would be working on this, certainly more than they do.Oh yes, and you’d sell more books, Dave!

  4. “The Perl community doesn’t have much time for trivial things like marketing.”

    Surely some mistake!

    I didn’t say that I agreed with that point of view. I’m just telling it like it is.

    If the language isn’t in the top of programmers’ minds, then they will be seduced by Java or .net and won’t use Perl. Then it’s a downward spiral, with less organisations using Perl, meaning there’s less Perl programmers required, meaning less converts to spread the word and get more organisations using it, etc.

    That’s been happening for years. And most Perl programmers will admit that it’s happening. But no-one seems to have the will to do anything about it. This is why I see these two new books as being so important. I’m hoping that people will start to use them to advocate the use of Perl as a serious programming language.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.