Be careful inserting actual values into a web page, especially in error messages from assertions, without careful escaping. Bad people can take advantage of that to do various kinds of injection attacks sometimes.
On Fri, Aug 19, 2011 at 5:36 AM, Tobias Kremer <tobias.kre...@gmail.com>wrote: > 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 > -- Check out my LEGO blog at http://www.brickpile.com/ View my photos at http://flickr.com/photos/billward/ Follow me at http://twitter.com/williamward
_______________________________________________ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates