I think I need to have one more 'go' at H::T, but I must admit I still hanker after having it all in the script!
It is your script, so do what you wish. However, it would be great if you share the reason for your "hankering." Maybe we will learn something.
Otoh, trust me, no better yet, trust the wisdom of ages -- separating logic from display would be the best transition you will make in programming. Putting millions of print and printf statements in the script not only creates a rat's nest, it is a mess trying to fix errors, and a chore trying to change its looks after-the-fact.
Other templating systems have received a lot of traction, and I know not much about them. What I like about H::T is its desire to be good at very, very few things -- kinda like the iPod. And I really appreciate Sam Tregar's (the author of H::T) almost bull-headed insistence (as it seems to me on reading his posts on the H::T list) on not introducing unnecessary logic in the H::T code. It makes for one of the most wonderful pieces of code to work with.
Try it. You may never work without it again whether you are creating dynamic or static websites or even munging data in non-web apps.
|