in reply to Text::Template
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Text::Template
by mirod (Canon) on Sep 20, 2000 at 22:34 UTC | |
Why do you want to replace HTML::Mason? Any shortcomings or specific flaws, or you just find Template Toolkit more powerful? The doc for Template Toolkit is quite... short and I really can't figure out what it does. | [reply] |
by merlyn (Sage) on Oct 22, 2000 at 17:56 UTC | |
| [reply] |
by princepawn (Parson) on Oct 23, 2000 at 16:50 UTC | |
Regarding Template, one must observe that it is middle-of-the-road. That is, on one hand, the conservative hand, we have HTML::Template which only allows one to place variables in HTML and thus demands maximum code re-use should you want to throw away your old HTML. On the other hand, the liberal hand, we have HTML::Embperl, where you can place Perl code right inside your HTML. In this case, you may not get around to creating abstractions and may not get the code-reuse the HTML::Template offers. But, it does offer abstraction mechanisms. You can create HTML::Subs which are like Perl subs, only their default language is HTML and you must escape to do Perl processing. Example:
And then of course, we have smack-dab in the middle, Template, the Template Toolkit. It allows you to play the conservative game and only inline Perl variables. But its %% PERL %% tag allows you to get as butt-wild as cpan::HTML::Embperl if you feel like it to. So, really, it is high-time that someone assess these modules based on full-blown development instead of all of the piecemeal arguments and flame wars that I have seen to date. | [reply] [d/l] |