in reply to Re: Re: The scope of templates
in thread I need a title - sucka! :-)

Thats wonderful. And what happens when somebody wants to change the font color to red? You get your text editor, open the perl script, find your heredoc (wherever it is) and then change the font color. Oh wait, he prefers the font color to be blue instead. No.. green. And so on and so forth. Or other minor graphical changes that should really be the providence of the web *designer* as opposed to the web *programmer*. Templates of course avoid both of these issues. As for inlining perl in to text, <tmpl_var foo> is hardly what *I* would call perl code. And what about caching? You can't cache individual here docs.. you can templates. Not to mention templates can also help impose a more logical structure upon your program.

Replies are listed 'Best First'.
Re: Re: Re: Re: The scope of templates
by PetaMem (Priest) on Nov 27, 2003 at 21:05 UTC
    If you have choosen to provide far reaching look&feel configuration in your more-than-average dynamic pages (which you most probably have), you solve these kind of things with CSS.

    BUT if you really need to have the font color changed quick & dirty, you will provide a button/selection box somewhere filling a var $font_color and in your (interpolating) here doc there will be:

    <font color="$font_color">

    Bye
     PetaMem
        All Perl:   MT, NLP, NLU