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
>> 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.
Plus Three, LP