Designing the application cleanly on top of CGI::Application will probably get you 70% of the way there.
Another point is that several arguments can be made against generated SQL. Have a look at the Phrasebook Design Pattern article on Perl.com.
Finally, this is a matter of taste, but I prefer the Template Toolkit over HTML::Template (which, btw, CGI::Application integrates with directly).
You probably want to read My Experiences with using CGI::Application and Template::Toolkit To Build an Online Shopping Cart.
Makeshifts last the longest.