Sam Tregar wrote:
> On Fri, 14 Apr 2006, Michael Peters wrote:
> 
>> So by making the "parser smart enough" do you mean copying that huge
>> regex from H::T and modifying it with the expr regex?
> 
> Yeah, or using Parse::RecDescent.  H::T::E already uses it for
> expressions, so using it for parsing the template itself might not be
> much slower.

I'll try my simple approach and see how that works first.

>> It looks like it also doesn't support 'default'.
> 
> What the heck would default do for expressions?  I can't think of
> anything reasonable...  There's no single variable to examine for a
> value in the general case.

Yeah, that makes sense, I guess I didn't really think it through. Would
it make sense though to allow it to be used if the entire expression
returned false?

>> A very simple approach would be to take any tmpl_vars/loops, etc that
>> use expr and capture anything before the expr="..." and after it and
>> then just add them to the generated tags. This however doesn't solve the
>> sub-ref problem.
> 
> What's the sub-ref problem?

I'm not sure :) I think I just mis-read your other email.

-- 
Michael Peters
Developer
Plus Three, LP



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to