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:
Pretty slick, huh? Here's what it drew for our
wrapper.tt, which is the parent of many of our templates:
You could throw the same crude implementation at any tree, really. I think I'll try all the
usestatements in our in-house perl code base next. :)
The source code is here: http://github.com/jhannah/sandbox/graphviz. Enjoy!