Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: The hidden charm of Template::Toolkit (and templates generally)

by Anonymous Monk
on Jan 08, 2008 at 17:41 UTC ( [id://661141]=note: print w/replies, xml ) Need Help??


in reply to Re: The hidden charm of Template::Toolkit (and templates generally)
in thread The hidden charm of Template::Toolkit (and templates generally)

In my experience, one killer reason for using Template::Toolkit is Jemplate (also on CPAN).

With this, you can use exactly the same templates server-side as client-side, and this provides a convenient way of achieving dynamic effects without writing them twice.

I like the option of building static copies of the site with ttree and tpage, which is useful for high traffic sites that just refresh content every N minutes instead of dealing with a Perl interpreter for each connection. Of course, you can do this with plain Perl, but I find Template::Toolkit just a bit easier.

p.s. Your example seems a little overcomplicated, wouldn't this do the job instead?

<td>[% book.authors.join(', ') %] ([% book.authors.size %])</td>
  • Comment on Re^2: The hidden charm of Template::Toolkit (and templates generally)
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://661141]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-20 00:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found