Re: [Templates] is it a feature or a bug?
[prev]
[thread]
[next]
[Date index for 2005/03/17]
See:
http://www.template-toolkit.org/docs/plain/Manual/Syntax.html
Section: Capturing Block Output
Quote:
--------------------------------
Note one important caveat of using this syntax in conjunction with
side-effect notation. The following directive does not behave as might
be expected:
[% var = 'value' IF some_condition %]
--------------------------------
Check the page for the rest.
-- Josh
qbxk wrote:
> so i was getting confused but i think i understand now, what i don't
> understand is whether this is expected behavior:
> ala:
>
> [% foo = [] IF 1 %]
> [% USE Dumper; Dumper.dump(foo) %]
> prints: $VAR1 = 'ARRAY(0x206cd7f4)' (prints some such, of course it
> varies)
>
> when
> [% baz = [] %] (or perhaps: [% IF 1 %][% baz = [] %][% END %] )
> [% USE Dumper; Dumper.dump(baz) %]
> prints: $VAR1 = []
>
> thanks.
>
> peace,
> -b
> qbxk@xxxxxx.xxx
>
> (shameless plug: template-toolkit in heavy use and advertised here:
> http://www.uvm.edu/wruv/?action=info&pg=thanks )
>
> _______________________________________________
> templates mailing list
> templates@xxxxxxxxxxxxxxxx.xxx
> http://lists.template-toolkit.org/mailman/listinfo/templates
>
> !DSPAM:42391d9050571740919489!
>
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
 |
Re: [Templates] is it a feature or a bug?
Josh Rosenbaum 06:07 on 17 Mar 2005
|