Re: (no subject)
Jochen Cichon <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.html-template |
|---|---|
| Message-ID | <[email protected]> |
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 > > ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar