While I agree, that a templating system has many advantages over a simple here doc (HD), it is also true that a HD with interpolation is already a simple templating system.
Furthermore if you have a close look at all the templating modules at CPAN, you will find there some enabling "real perl processing", thus inlining perl into templates. Wuuuh... Bad idea. So instead of inlining text into Perl (HD), you inline a template into perl only to find, that you need more expressive power so you inline Perl into the text you inlined into Perl. Very bad.
Lets assume our standard case. For every nontrivial HTML document (heavy-duty dynamics), you have not only to interpolate variables, but also do some more processing which is done in some subroutines/submodules. So what do you do? You use Perl to generate the document and use HDs for the simple things/static parts.
Now to sum up what impression I really get: many templating system advocates are blind because of the greater expressional power of the templating system (compared to HD), so they try to apply templating to every document generation.
This is wrong IMHO. Speaking of expressional power you have
Don't try to warp the Perl/Template ordering. Just believe me. Been there - done that.E(Perl) >> E(Template) >> E(HD)
Bye
PetaMem All Perl: MT, NLP, NLU
In reply to Re: Re: The scope of templates
by PetaMem
in thread I need a title - sucka! :-)
by PetaMem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |