25th
Webstraction 1: TextMate and HTML::Template
This is the first of a series of webstractions. A webstraction is a wander through stuff you weren’t originally looking for when you’re searching for something you really want. Webstratactions can be productive, but they’re also huge time-munchers.
Okay. So I’m installing this spam-proof contact form my friend Ben has written. It uses Perl’s HTML::Template. I open it in TextMate and think: wouldn’t it be nice to have the syntax coloured separately from any normal HTML comments?
I work out how to install TextMate bundles (don’t forget to ‘su’ or ‘sudo’ - the manual doesn’t remind you), then install the subversion client on OS X, and do a quick Google search for TextMate HTML::Template Bundle. A few finds to check, only one valid: it appears Brad Choate (SixApart, MovableType) wrote such a bundle. It’s mentioned on the readme page of an svn repository of TextMate bundles. But it isn’t there. Or I can’t see it. Or it has an odd name. Or (I look again) it still isn’t there.
Anyway, while I’m poking around I install the bundles for Template-Toolkit and a couple of others. Just to see what happens. They work.
Then I (logically) email both TextMate support, Brad Choate and (randomly) Michael from the OnPerl blog, which I found because HTML::Template and TextMate are both mentioned somewhere, but not in a way that’s helpful to my inquiry. While I’m there, I read some other interesting posts. Meanwhile, both OnPerl emails to Michael bounce back to my in box.
Oh yes, and I also spent a load of time at Brad Choate’s blog, looking at Perl stuff (because MovableType uses a derivative of HTML::Template, see? And I thought that might be interesting, having done a couple of jobs on MT). I even looked at his family on Flickr. Why? Because I wanted to see what he (and his family) looked like. They seem nice (and richer than me). At that point I knew I had to stop.
A few days later, Brad responded by uploading Perl HTML-Template.tmbundle, and all was well :-)
Webstraction timer: about 3 hours.
Actual work done: about 15 minutes