Re: [htmltmpl] TMPL_IF truth vs definition

2002-06-23 Thread Sam Tregar
On 23 Jun 2002, Tugrul Galatali wrote: > 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 defaul

Re: [htmltmpl] TMPL_IF truth vs definition

2002-06-23 Thread Tugrul Galatali
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 thinki

Re: [htmltmpl] TMPL_IF truth vs definition

2002-06-22 Thread Sam Tregar
On Fri, 21 Jun 2002, Douglas Kirkland wrote: > The problem I see with that, is if the TMPL_IF is reading the data. we > should be able to see if the data equal a value. If that is a case then > there should be something like this: > > Use HTML::Template::Expr and spell that: And your wis

Re: [htmltmpl] TMPL_IF truth vs definition

2002-06-22 Thread Sam Tregar
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 c

Re: [htmltmpl] TMPL_IF truth vs definition

2002-06-21 Thread Brian McCain
ailable in HTML::Template::Expr. Brian McCain PageMasters Internet Group - Original Message - From: "Douglas Kirkland" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 21, 2002 2:16 PM Subject: Re: [htmltmpl] TMPL_IF truth vs definition | On Friday

Re: [htmltmpl] TMPL_IF truth vs definition

2002-06-21 Thread Douglas Kirkland
On Friday 21 June 2002 09:43 am, you wrote: > Hi Tugrul, > > I normally don't jump in on these conversations, but are you really > suggesting that TMPL_IF be true if the value of the variable is 0? 0 = true > goes against everything computers stand for. > > > TMPL_IF works all of the time except w

Re: [htmltmpl] TMPL_IF truth vs definition

2002-06-21 Thread Stefan Seifert
> I'm taking a short cut by never exporting a boolean. I'm working on the >model if the data exists, then include this HTML with the output. So if >the conditions are never met (say, a table of people matching a >criteria, but there happen to be none), I never set that variable, and >theref

RE: [htmltmpl] TMPL_IF truth vs definition

2002-06-21 Thread Alex Porras
gt; > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Alex Porras > Sent: Friday, June 21, 2002 11:09 AM > To: Kenny Smith > Cc: Tugrul Galatali; Chris Davies; > [EMAIL PROTECTED] > Subject: RE: [htmltmpl] TMPL_IF truth vs defi

RE: [htmltmpl] TMPL_IF truth vs definition

2002-06-21 Thread Kenny Smith
th Cc: Tugrul Galatali; Chris Davies; [EMAIL PROTECTED] Subject: RE: [htmltmpl] TMPL_IF truth vs definition On Fri, 21 Jun 2002, Kenny Smith wrote: > 0 = true goes against everything computers stand for. Except for those silly shell scripts. :P

RE: [htmltmpl] TMPL_IF truth vs definition

2002-06-21 Thread Alex Porras
On Fri, 21 Jun 2002, Kenny Smith wrote: > 0 = true goes against everything computers stand for. Except for those silly shell scripts. :P --Alex --- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ ___

RE: [htmltmpl] TMPL_IF truth vs definition

2002-06-21 Thread Tugrul Galatali
On Fri, 2002-06-21 at 12:43, Kenny Smith wrote: > Hi Tugrul, > > I normally don't jump in on these conversations, but are you really > suggesting that TMPL_IF be true if the value of the variable is 0? 0 = true > goes against everything computers stand for. > Gah, I should have just mad

RE: [htmltmpl] TMPL_IF truth vs definition

2002-06-21 Thread Kenny Smith
Hi Tugrul, I normally don't jump in on these conversations, but are you really suggesting that TMPL_IF be true if the value of the variable is 0? 0 = true goes against everything computers stand for. > TMPL_IF works all of the time except when the data that exists just > happens to be 0 (or anyt

RE: [htmltmpl] TMPL_IF truth vs definition

2002-06-21 Thread Tugrul Galatali
> I don't really see why you can't take the pain and amend your CGI scripts. > What documentation warnings are you referring to, that advise against this > course of action? (I can see one warning against matching TMPL_IF to perl if > statements, but that doesn't seem to apply.) > > Consider the

RE: [htmltmpl] TMPL_IF truth vs definition

2002-06-21 Thread Chris Davies
On Friday, June 21, 2002 3:14 UTC, Tugrul Galatali wrote: > [...] I had gotten into the habit of using TMPL_IF in the sense of if a variable is defined instead of if it is true. Now 99% of the time this just happens to work, as most defined things are also considered to be true. But that 1% needs

[htmltmpl] TMPL_IF truth vs definition

2002-06-20 Thread Tugrul Galatali
Even though I read the documentation for HTML::Template at some point, I had gotten into the habit of using TMPL_IF in the sense of if a variable is defined instead of if it is true. Now 99% of the time this just happens to work, as most defined things are also considered to be true. But t