Try something like this (untested): [% myvar = 0; IF myvar != 5; 'myvar should be 5, actual ' _ myvar; END; %]
HTH, Toby On Fri, Aug 19, 2011 at 1:33 PM, Andrew Black <andrewdbl...@googlemail.com> wrote: > I am trying to put some assertions into a template. The sort of thing I > want is > > [% > myvar = 0 > # ..... soemthing that modfies myvar > > if myvar != 5 print STDERR 'myvar should be 5, actual $myvar' > > %] > > But I can't get my head around the syntax. Are there any plugins or similar > that might help me. > > _______________________________________________ > templates mailing list > templates@template-toolkit.org > http://mail.template-toolkit.org/mailman/listinfo/templates > > _______________________________________________ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates