mod_perl 2 User's Guide published: An interview with co-author Jim Brandt

By Andy Lester on September 10, 2007 10:57 PM | 1 Comment

spacer mod_perl2 User's Guide (modperl2book.org) by Stas Bekman and Jim Brandt has just been published by Onyx Neon, and Amazon says it's shipping. I can't think of the last time I've been as excited to see a Perl book get published. Besides brian d foy's Mastering Perl, there hasn't been a significant Perl book in quite a while. Perlbuzz is going to work with Onyx Neon to have a book giveaway, so watch this space in the next few days.

Jim Brandt took some time to talk with me about the book, why you need to switch to mod_perl 2, and why it took so long to get the book to market.

Andy: Your new book mod_perl 2 User's Guide is now shipping. It's an update to Practical mod_perl, probably the thickest Perl book ever. (So thick that Liz Cortell once made a lunchbox out of one!) How does this one compare?

Jim: In many ways it's not an update to the first book in the 1st edition, 2nd edition sense. Like Apache 1 and 2 and mod_perl 1 and 2, the new book is coverage of the new stuff in mod_perl 2. Much of the content of Practical mod_perl is still relevant. But Apache 2 brought many changes, so mod_perl 2 had to change too. That's what the book's about. And it's not as thick.

Andy: Did you pull stuff out?

Jim: We started fresh, so we weren't working with Practical mod_perl as a starting point.

Andy: And so you didn't have to go Creative Commons licensing.

Jim: Right. It's a completely new book, so were could do what we wanted. This version is "owned" by the Apache Software Foundation. The full content will also be released on-line, as with Practical mod_perl. Also, it's an edited and updated version of the content from the mod_perl site, so in a sense it's out there now.

Andy: So how did you get involved? How much is you, how much is Stas?

Jim: Stas created all of the original content as documentation in the mod_perl 2 section of perl.apache.org. Allison (Randal, publisher) began working on pulling it together into book form and was looking for an editor. brian d foy mentioned it to me, I got involved, then became more of an author as I got to work on editing and re-writing sections. Stas was available throughout to answer questions. So I guess if you run a big diff between the book and the mod_perl 2 docs on perl.apache.org, you'll see how much was me. :-)

Andy: How long did it take?

Jim: Well, a bit too long, and that was my fault. I had a few life events that got in the way a bit. I got started nearly 2 years ago. We wanted it done by YAPC this year, but that slipped to OSCON and we missed it. But Allison and Tom McTighe (the real editor) really stepped up at the end and we finally pulled it together in August.

Andy: What surprised you most about the project?

Jim: I suppose learning how much is behind mod_perl and how much work a core group of people do to make it happen. In that way, it's similar to Perl itself in that the more you know the more you appreciate the efforts of a small group of very dedicated and very smart people.

Andy: Please tell me there's good stuff in the book about migrating mod_perl 1 to mod_perl 2. It's something I've muddled through before, and I need to do it again, and I'm not looking forward to the trip.

Jim: There are several chapters dedicated to just that. And good information on the tools available, including a walkthrough of migrating an actual module from 1 to 2. There are several utilities available to help you look up methods that have moved, which will be the first thing people hit. And the Apache2::Compat module gets you running quickly while you make the changes you need to make.

Andy: What in your Day Job brought you to the mod_perl 2 book project?

Jim: We use mod_perl, but we've been stuck at 1 because we were using an auth module that only worked with Apache 1. So I guess you could say nothing directly from my job was related to mod_perl 2. It just seemed like the book needed to be out there.

Andy: I figured there was some tale of mod_perl 2 hell that led you down this path.

Jim: No, I did what no one does. I read the instructions (and wrote them) first.

Andy: What should people know about mod_perl 2?

Jim: I think the main message I'd like to get out there is that Apache 2 and mod_perl 2 have been out for a while, they are stable, and they are the future. That's where much of the new development effort is going. It's time to upgrade. With no vendor out there to "desupport" you, people tend to hold off, but I think it's really time. I know I'll be getting our Apache 2 / mod_perl 2 migration plan going at work and we'll be looking to move over the next year or so.

Andy: You say that mod_perl 2 is the future, but what if I've got a perfectly good, working stable app running under Apache 1 and mod_perl 1. Staying on mod_perl 1 is certainly building up technical debt, but what does mod_perl 2 give me for my troubles?

Jim: It depends on how you're using it. If you're just using it for CGI acceleration, you could stay where you are. The risk you run is that some Apache 1 module you rely on might not get that next security update. I don't know that anyone is saying they are going to stop support in their Apache 1 tree just yet, but it will happen.

If you use mod_perl for true module development, there are some new features that you'll want. The biggest is probably the access to Apache configuration info and new ways to pass in configuration info from Apache to your handlers. You can add custom Apache configuration directives in pure Perl, where with mod_perl 1 you needed XS. So if you want the module user to pass some info, you can have them load the module and it can create an Apache directive like "PerlGods" that takes "Andy" and "Jim" as two parameters. There's a full Perl interface for defining how these directives should be parsed and evaluated by Apache.

Other new features: It is now usable on Win32 because you can run it threaded. You have more access to input and output filters than before. And, with Apache 2 and mod_perl 2 you're also not limited to just the HTTP protocol any more. They've both been redesigned to serve any protocol, so you could write an FTP or SMTP server in mod_perl 2.

Andy: Would you want to?

Jim: Ah, good question. I think this area hasn't really been tapped much yet, so those are the sorts of examples that we used to explain the idea. My guess is this flexibility will be used to serve things we haven't thought of yet.

Andy: You alluded to life changes earlier. Care to elaborate for the reading public?

Jim: Well, my wife and I had triplets, and adding that many babies to our already busy household put a major demand on my time. Triplets are an amazing amount of work anyway, and trying to squeeze in time for the book in addition to the day job was really tough, and that's why things stalled for a while.

Andy: Which is more likely: Working on another book, or having more triplets?

Jim: I can see working on another book if one comes along that I can contribute to. No more triplets, I can say that for sure.

Andy: Thanks for talking with Perl Buzz. Good luck with the book. I hope it takes off!

Jim: Thanks! Hope you enjoy it.

Tags:

  • books,
  • Jim Brandt,
  • mod_perl 2,
  • Onyx Neon,
  • Stas Bekman

1 Comment

spacer saj.thecommune.net | September 11, 2007 1:26 PM | Reply

Regarding non-HTTP in mod_perl, there is Apache::Qpsmtpd and Mail::SpamAssassin::Spamd::Apache2. Those are the only two I can think of.

Leave a comment

Follow Perlbuzz

spacer

Job hunting for programmers


Land the Tech Job You Love, Andy Lester's guide to job hunting for programmers and other technical professionals, is available in PDF, ePub and .mobi formats, all DRM-free, as well as good old-fashioned paper.

Perlbuzz

  • Perlbuzz news roundup for 2012-01-02
  • Perlbuzz news roundup for 2011-12-19
  • Perlbuzz news roundup for 2011-12-12
  • Perlbuzz news roundup for 2011-12-05
  • Perlbuzz news roundup for 2011-11-28
  • Finding a lost dog's owner with Perl and WWW::Mechanize
  • Perlbuzz news roundup for 2011-11-21
  • Perlbuzz news roundup for 2011-11-14
  • Perlbuzz news roundup for 2011-11-07
  • Mark Jason Dominus on giving fish

spacer Subscribe to Perl Buzz

Mechanix

  • Low-tech high-speed OS X program launching
  • Fixing my #1 bash annoyance
  • Handling multiple SSH keys in your SSH config
  • Cool vim plugin of the day: surround.vim
  • When to use JPEG, when to use PNG
  • Git is my hero
  • Downloading video with Awk
  • Creating Excel files with Perl
  • Scrabble cheating with Perl one-liners
  • Use Getopt::Long even if you don't think you need to

spacer Subscribe to Mechanix

Contact

  • Email andy@petdance.com
  • Twitter Perlbuzz

Other Perl Sites

  • perl6.org
  • Rakudo.org, home of Rakudo Perl 6
  • Modern Perl
  • Proud To Use Perl
  • The official Perl wikis
    • Perl 5
    • Perl 6
    • Parrot
  • News at The Perl Foundation
  • use.perl.org
  • jobs.perl.org
  • Perlcast, the Perl podcast
  • Yet Another Perl Game Hacker

Archives

  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007

Categories

  • Advocacy (21)
  • Business (7)
  • CPAN (102)
  • Code craft (41)
  • Community (87)
  • Conferences (67)
  • Interviews (7)
  • Opinion (28)
  • Parrot (25)
  • Perl 5 (121)
  • Perl 6 (84)
  • Perl Foundation (49)
  • Rakudo (20)
  • Windows (7)

About Perlbuzz.com

  • Why Perlbuzz?
  • About the editor
  • How to contribute
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.