Re: [htmltmpl] (no subject)
Brought to you by:
samtregar
|
From: Sam T. <sa...@tr...> - 2005-07-11 14:49:53
|
On Mon, 11 Jul 2005, Jochen Cichon wrote:
> Hm, was my first Idea also,
>
> but why is condition evaluated a second time ONLY if it is TRUE on the first
> run?
HTML::Template compiles an IF/ELSE into two JUMP IF ops:
JUMP to A IF false
...
...
JUMP TO B IF true
A: ...
...
...
B: ...
Thus a false condition is only tested once, but a true condition gets
tested twice. The trick will be to link the two jumps so that the
second one re-examines the result of the first rather than running the
code again.
-sam
|