Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Push style templating systems

by metaperl (Curate)
on Mar 19, 2008 at 18:28 UTC ( #675054=note: print w/replies, xml ) Need Help??


in reply to Re: Push style templating systems
in thread Push style templating systems

Template::Recall and CGI::FastTemplate do a much simpler regex-like substitutions.
I think you mean StringTemplate, not CGI::FastTemplate... anyway, StringTemplate requires the Antlr parser generator to work, so I dont think it does simple regex substitutions.

Replies are listed 'Best First'.
Re^3: Push style templating systems
by perrin (Chancellor) on Mar 19, 2008 at 21:01 UTC
    CGI::FastTemplate is a module with a similar approach to Template::Recall. It uses regexes.
      Wow, CGI::FastTemplate is definitely push-style.. I've updated the main node. Never heard of it til now. Question is, why is it in the CGI namespace? It could be used on plain text and standalone with no web sense whatsoever.

      Thing is, breaking a table into 3 files as shown in the full example eliminates one major push-style benefit, the ability to statically validate and clean HTML... and another push-style benefit: the ability to edit with an HTML page-oriented tool.

      Interesting module nonetheless.

      Finally, your statement about Seamstress and div/class tags is a bit of a simplification. The more recent API calls in Seamstress can use anything that the look_down() method in TreeBuilder can.

        This module works the closest that I can see to Template::Recall, except it doesn't have the ability to save the sections in a single file. It has a define_nofile() method, but this requires you to define the template as a string in the code file... I wondered the same thing about the namespace -- I guess they were simply focused on CGI at the time.

        Template::Recall can also do sections as files, but I've found that in practice, keeping sections in a single file is much more convenient.

        A blog among millions.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://675054]
help
Chatterbox?
[holli]: good morning you beautiful people. happy last work week of 2017

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2017-12-18 04:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (467 votes). Check out past polls.

    Notices?