I have been using template toolkit for extending an existing domain specific language(verilog) for over 3 years now. While overall I am happy with it, the major irritant is that
take a look on Template::Semantic for pure template abstraction