Just because something is written in perl doesn't mean that perl is responsible for its errors, or that a perl forum is the right place to ask about them. There are dedicated mailing lists for Template Toolkit.
Re^3: argument """ isn't numeric in numeric gt(>), error
Replies are listed 'Best First'.
Then we should stop answering questions about XML, HTML, shell-scripts, SQL, general discussions about algorithms, ... as well since there are more dedicated forums for these elsewhere.
IMHO I consider Template Toolkit sufficiently close to Perl and even a valuable addition to and tool for our beloved language, that any question about it can be entertained here.
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James