Thanks to all who replied; I've been considering everyone's comments and it's all been helpful. Which isn't to say that I now know exactly what I'm doing....
For now I followed mostly Perrin's advice, and rewrote the included code to instead generate a complex data structure that I passed to a Template Toolkit template. I kept all the summary calculations in the Perl, so the only programming-ish things in the template were FOREACH loops and a few conditionals to handle things like the alternate-colored lines and such.
It works perfectly, i.e. exactly the same as it was before but more modifiable. I must say that I still feel a little uncomfortable with it--the programming in the template, while hardly complex, is still programming, and it's distracting to have a different way of handling looping, comparisons, and data structures. But I'm learning, and TT has so much neat stuff that I concede it's probably worthwhile to know more about it in the long run.
Thanks again for the ideas. Next stop, on to Class::DBI!
In reply to Re: Re: Trying to understand template-foo
by jest
in thread Trying to understand template-foo
by jest
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |