Re: [htmltmpl] TMPL_IF truth vs definition
Brought to you by:
samtregar
From: Tugrul G. <tu...@ga...> - 2002-06-23 23:55:54
|
On Sat, 2002-06-22 at 15:54, Sam Tregar wrote: > I disagree. Ternary logic (where there are three logical values true, > false and unknown) is NOT commonly understood by non-programmers. Thus, I > don't think this is a good candidate for the default syntax. Three values? I'm only thinking two here, exists and does not exist. > However, it's easy to do with HTML::Template::Expr. If you don't like > writing <tmpl_if expr="defined(foo)"> then just write a filter to change > "<tmpl_if_defined foo>" (or whatever you like) into it. Now that I've read the code, the thing is that you already check if something is defined, and then you check if its true. I just want to be able to turn off the check if its true. I don't care if its true or false, just if it exists. I don't see the point in taking whatever performance hit/complexity filters and H::T::Expr introduce when what I want is already there :) Also, does the H::T::Expr solution work with JIT? Tugrul Galatali |