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'
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.