Hi,

I found some weird behaviour with TT2 2.07 (perl5.6.1, debian)
Seems to be with both the perl & XS stash.

$ cat tt2.bug 
[%
        first = "first string";
        first = first IF 0; # clears first
        first;
%]
[%
        second = "second string";
        second = second IF 1; # works fine
        second;
%]
$ tpage tt2.bug 

second string
$ pmvers Template
2.07

The original code was like:
   [% js_cmd = "clear_something();" IF whatever %]
   [% js_cmd = js_cmd _ "extra();" IF cfg.var # This cleared it %] 
   [% # use js_cmd %]

>From reading the Changes, it doesn't seem to be fixed in
subsequent versions but might be.

Thanks,

Brad

-- 
 A person who knows but a little will put on and air of knowledge. This
 is a matter of inexperience. When someone know something well, it will
 not be seen in his manner. This person is genteel.         -- Hagakure 



_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to