in reply to Re^3: How do I run a loop within a PSGI application
in thread How do I run a loop within a PSGI application

Hi Grandfather, I concur with your assessment of Template Toolkit and HTML::Template as regards complexity. However, as shown in Kevbot's reply, Template::Tiny is comparable to HTML::Template in offering a basic feature set without enough rope to hang oneself. And it also provides the upgrade path to TT, so templates made for it will still work once you upgrade for the full feature set. And if you are lazy, the syntax requires less typing, as a template variable is written [% varname %] rather than <TMPL_VAR NAME=varname>

I recommend checking out Template::Tiny; It makes a lot more sense than using the venerable (and perfectly capable) HTML::Template IMHO. (As an aside, even though the author named it HTML::Template, it can be used, like TT and Template::Tiny, to generate any document from a template.)

The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^5: How do I run a loop within a PSGI application
by GrandFather (Saint) on Aug 18, 2015 at 21:56 UTC

    It's exactly the "full feature set" that bothers me with TT. Most of those features seem to be ways of blurring the distinction between template and code which is a major part of what templating systems were initially designed to avoid.

    Template::Tiny looks nice. It's unfortunate that it is documented in terms of what it doesn't do rather than fully documenting what it does do. For a new user you first need to read the TT documentation then forget all the bits that don't apply. That'd be OK if the TT documentation was easy to read and understand - it's not.

    "lazy" often means typing a few more characters so you don't have to type more characters later following a frustrating debugging session. Neither justification translates into "a lot more sense" IMO and the lack of "one stop" documentation kills Template::Tiny as an option for me.

    Premature optimization is the root of all job security