Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Re: Trying to understand template-foo

by jest (Pilgrim)
on Sep 16, 2003 at 17:58 UTC ( #291904=note: print w/replies, xml ) Need Help??

in reply to Re: Trying to understand template-foo
in thread Trying to understand template-foo

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!

  • Comment on Re: Re: Trying to understand template-foo

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://291904]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2022-01-29 14:37 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (74 votes). Check out past polls.