On Wed, Apr 6, 2011 at 3:21 PM, Michael Peters <mpet...@plusthree.com> wrote: > Any questions? Comments? Verbal Abuse? Any offers of help?
I have some comments which are intended to be constructive, though they may come across as otherwise. I apologize in advance. I used HTML::Template for a few years. I was happy with the functionality. The speed was okay, but I kept looking for ways to improve it. But finally I decided I needed to abandon it, because mentally I just couldn't handle the fact that setting an attribute in the object was dependent on the attribute existing in the template. I ended up writing my own templating system with the functionality of H::T that was based solely on regular expressions. This gave me a 40% speed increase in the context of how I am using templates. In addition, I can set attribute values in my objects whether or not those attributes exist in the template, allowing me to build a hierarchy of template objects (with children inheriting values from their parents). The cost to the programmer is a bit of verbosity, e.g., instead of <TMPL_LOOP NAME="LOOP_NAME"> ... </TMPL_LOOP> one must write <TMPL_LOOP NAME="LOOP_NAME"> ... </TMPL_LOOP NAME="LOOP_NAME"> But 40% is 40%, plus I got the object behavior that I could live with. So having said all that, I want to suggest looking at the various H::T-base modules on CPAN to see what they implement that might be good for the base H::T code. I looked at H::T::Compiled (in my quest for speed) and found the following loop variables that I liked and adopted in my module: __index__ (__counter__-1) __break__ There are others (like TMPL_ELSIF) that might also find a home in the base module. Conclusion: - Take what I say with a grain of salt, since I stopped using H::T :-) - Take a look at the other H::T-based modules to see if they give some additional ideas. Regards, Brad ------------------------------------------------------------------------------ Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev _______________________________________________ Html-template-users mailing list Html-template-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/html-template-users