I've created DBI::Format::HtmlTemplate and DBI::Format::Template for use with DBI::Shell. You feed them the name of an HTML::Template or Template::Toolkit template file and an active $sth and they do the rest. DBI::Shell is undergoing some revisions so I'm not releasing them yet, but if you're interested, I could make them available.