Re: [htmltmpl] (no subject)
Brought to you by:
samtregar
From: Jochen C. <htm...@dh...> - 2005-07-11 07:24:34
|
Hm, was my first Idea also, but why is condition evaluated a second time ONLY if it is TRUE on the first run? I have looked into the source, but was not sure of it's a problem of the resolving ... or maybe of the parser? -- Jochen Sam Tregar schrieb: > On Fri, 8 Jul 2005, Jochen Cichon wrote: > > >>Any Ideas? >> >> >>It seems not to be a problem with the rand, it seems more to be a >>problem when the expr is somehow different in the two runs. So why >>is ist pared twice? (sometimes!) > > > I think it's because HTML::Template is evaluating the condition twice > - once in the "TMPL_IF" and once in the "TMPL_ELSE". This usually > works fine since most boolean conditions are stable but not for > rand()! If you're interested in fixing this the relevent code is in > HTML::Template::output(). I think this could be quite challenging to > fix! > > -sam > > |