in reply to Re^2: Perl, Web Apps, HTML::Template, HTML::Mason and the future
in thread Perl, Web Apps, HTML::Template, HTML::Mason and the future
Template::Toolkit on the other hand is a more general templating solution which will equally well handle non-HTML / non-Web matters.
I use it regularly to write LaTex files which when rendered make nice lay-outed PDF-files. Although not impossible to do, it would require more effort to do so from a less performant templating system.
Its biggest strength is the way it can handle easily and elegantly, all kinds of data-structures (such as hashes of arrays of hashes of hashes of ...) and can use most of the standard Perl-modules (CGI, DBI, ...) directly from within itself. And before someone complains and starts a holy flame war: this indeed breaks the holy law of division of concerns and allows you to sneak in programming into your display layer, but sometimes it is damn handy to do so ...
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|