CPAN Nuggets: Debugging Tools

Just thought I’d take a moment to share a couple of CPAN modules I love using for development and debugging my Perl web applications. They are not restricted to web application development, so give them a try!

DBIx::Profile

This module is a godsend when trying to figure out what is going on in DBI land. I typically include it in my Apache config: PerlModule DBIx::Profile, restart the server, and watch the log while I hit it. It shows every SQL statement as it is being run, along with the time it took for each statement to run and how many times it called each of the prepare, execute, and fetch operations. Priceless!

Carp::Always

This little gem was brought to my attention a couple of weeks ago by Andy Lester when he made it out to our Grand Rapids Perl Mongers meeting (thanks, Andy!). I had seen a slick one-liner previously that, by including in your code, would force a stack trace if anything died:

use Carp; $SIG{__DIE__} = &Carp::confess;

Carp::Always makes it even easier — just use it and you’re done. Score one for another quick, easy tool from CPAN!

Design Changes

Truth is I’ll probably always be playing around with the styles on here.  I just wasn’t satisfied with the original design I came up with — I wanted something simpler that put as much focus on the content as possible.  It doesn’t have a lot of color and I moved all of the sidebar content to the bottom to remove distractions.  Personally, I like it, but I wouldn’t mind some feedback.  My one big concern is that the links to the categories, search, etc. are too far out of the way… we’ll see.

So, enjoy.  And let me know what you think in the comments!

Andy Lester @ Grand Rapids Perl Mongers

Andy Lester will be making the trip up from Chicago this month for our Grand Rapids Perl Mongers meeting. He will be presenting, “Things you may not know about Perl”, so join us if you can.

Note the time is different than usual: it is going to be Friday evening from 5:30 - 6:30. I guarantee you won’t want to miss it!

Noteworthy link: High Scalability

High Scalability website

If you’ve ever been curious about what lies beneath the biggest sites on the web you owe it to yourself to check out the Real Life Architectures section. I was surprised how many of them listed PHP in their technology stack.

A Perl Monger’s take on Ruby: Conclusion

In parts one and two I took a look at the differences and similarities between Ruby and Perl, and I think I owe it to everyone to publish a brief conclusion. My basic feeling is that while Ruby is a fantastic language, the following are a few reasons I won’t be abandoning Perl any time soon.

Proven track record

Perl has been in serious use since before Ruby was even a murmur on the internet. It has a long history of serving its purpose well and quite a list of accomplishments: everything from powerful, dynamic websites to utilities supporting the daily operations of large companies. Its performance and reliability have been proven over and over again.

Open source community and CPAN

The Perl community is active, friendly, and full of very intelligent people. As evidence of that I submit the CPAN, the Perl Mongers groups that can be found around the globe, and the different Perl mailing lists that gladly offer help to anyone seeking it.

mod_perl

Anyone who has used mod_perl can attest to the flexibility and power it gives developers. I have been involved in using it as a platform to seamlessly integrate custom Perl authentication and navigation with third-party, closed-source web applications written in completely different languages. Mod_perl is a serious tool that I would have a very difficult time leaving behind.