Thanks for a response Sam.
On Mon, Jul 18, 2005 at 05:10:07PM -0400, Sam Tregar wrote:
> On Mon, 18 Jul 2005, Mark Stosberg wrote:
>
> > There are a couple features of TT that seem reasonable to support, and
> > seem at first glance like things that an be added while maintaining
> > compatibility.
> >
> > 1. Support for complex data structures.
> >
> > 2. Method calls.
>
> Isn't there something on CPAN to enable this yet? Everytime someone
> asks I point out how easy this would be with an overridden param() in
> a sub-class. I figured someone would have gotten on it by now!
>
> > To me, these additions wouldn't violate the integrity of H::T's
> > philosophy, which I interpret as being about keeping the tag language as
> > simple as possible.
>
> #1 I can get behind. #2 makes me itch. There's a high potential for
> abuse here since methods can have side-effects which would break the
> straight data-path from code to template to output.
I'm also more interested in number 1 than number 2. Do you mean "get
behind" as in: "go forth and prepare a patch ye feature requester"
> > They simply give the programmers more power and freedom expression, and
> > can help prevent extra hoop jumping when you have an complex data
> > structure or an object that need to hook up with the template anyway.
>
> HTML::Template isn't really about power and freedom of expression. I
> think TT or EmbPerl are more appropriate for someone that wants those.
> HTML::Template is more about simplicity and reasonable constraints on
> expression. I think of my user-base as being composed in equal parts
> Perl coders and HTML designers. Power and freedom of expression may
> help the Perl coder but they're nothing but trouble for your HTML
> designer!
In between the coder the designer is some kind of understanding about
what valid token names are, usually provided by the programmer.
I think most often this communication is implicit because the programmer
puts the tokens in the document in the first place. In this case,
exactly how the tokens came to be isn't interest to the designer.
Wouldn't the method call support be sort of like coderef support that is
already there? It seems like it might even be implemented like that: as
as callback which gets the method name passed in as a parameter.
Mark
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Html-template-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/html-template-users