Re: [htmltmpl] TMPL_IF truth vs definition
Brought to you by:
samtregar
From: Sam T. <sa...@tr...> - 2002-06-22 20:43:46
|
On 20 Jun 2002, Tugrul Galatali wrote: > And I feel that ifdefined is fundamentally simple enough (almost > simpler than if true since its almost not even logic) that it should be > included. 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. 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. -sam |