Perl, Template Toolkit, and GraphViz
Originally posted to headrattle on 2009-05-18.
Our largest Catalyst application (ssl.omnihotels.com) is composed of 184 templates. I get lost sometimes while template diving, and forget the parent node(s) of my current node.
Inspired by The Perl Review Issue 4.1, I decided to give GraphViz a stab. To my surprise, I got it working very quickly. I wrote a quick CGI hack that lets me click on any of my templates from a list on the left, and it draws an INCLUDE diagram of all downstream templates for me. Here's a screen shot of the CGI in action:

wrapper.tt, which is the parent of many of our templates:

use statements in our in-house perl code base next. :)
The source code is here. Enjoy!
- ← Previous
wget mysqltuner.pl - Next →
perl5 introspection (thanks Moose!)