Not to put too fine a point on it, but I suspect most of these would not be an issue if you used TT as a templating system rather than as a programming language. If you want to actually write programming logic in your templates, I think you'd be better off with an in-line Perl approach. - Perrin