The framework offered by
CGI::Application is very straight-forward and direct and from my experience, allows you to prototype applications very quickly.
While its true that CGI::Application has been built with a bias towards usage of HTML::Template for templating, there is absolutely nothing to stop you from using the Template Toolkit.
Indeed, you can implement the usage of Template Toolkit within CGI::Application via two means:
- Build your own class on top of the CGI::Application base class, overwriting the load_tmpl method with your own template initiation module - This is a very easy thing to do given the design of CGI::Application as a base class. ALternatively, you could initiate the Template Toolkit object within your scope and simply ignore the load_tmpl method inherited from CGI::Application.
- Subsequently, once the Template Toolkit object exists within the scope of your application, you can return the result of $template->process( $file, $params ) at the end of the application, much in the same way you would with the output method of HTML::Template.
Additionally too, the integration of CSS with your templates should be encouraged as you then have the benefits of not only the separation of code and interface (CGI::Application and Template Toolkit), but also interface separation of content and context (HTML and CSS).
perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'