I agree with Discipulus that #3 is the only sane choice for applications that are either large or likely to grow. I don’t really recommend Template::Toolkit. This is not because I don’t like it, I do, it’s really wonderful, but it’s so deep that it crosses the boundary of template engine and moves into mini-language. It’s also very slow compared to some of the alternatives, including Template::Alloy which can use Template::Toolkit syntax; so it’s the way to go if you want that. Text::Xslate feels shallow by comparison but it’s closer to the ideal of a view (only does presentation and the most basic logic/code and it is variable context ignorant which is kind of unPerly) and it’s terribly fast. As far as that goes, speed in the template layer is not always a prime concern. Depends on the application. Both TT and TX cache templates for performance improvement too.
Update: typo fix, grazie mille, Discipulus.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|