Perl Template Toolkit book

Ovid on 2004-10-02T07:05:13

The surgery on my ear went well, so I've spent much of the day with a new book. It's been about a year since I've had a chance to do any serious work with the Template Toolkit, so I was quite happy when I bought Perl Template Toolkit. The book is wonderful and the examples are great. What really makes it refreshing is that this book is clearly written by experienced programmers who understand the need of laying things out properly, not duplicating code and maintaining a proper separation of concerns.

One thing I was curious about, though, was chapter 11. Try as I might, I can't quite get the hyperlinks right in the nested menus. Typing straight from their examples, I still have single menu items getting forced into their own directories.

  • Home - index/index.html
  • About - about/index.html
  • News - news/index.html
  • Documentation - docs/index.html
    • - Introduction docs/index/index.html
    • - FAQ docs/faq/index.html
    • - Manual docs/manual/index.html

I assume the intent wasn't to force me to create all of those subdirectories with one file each, but for the life of me, I can't find my typo. (Maybe it's the morphine or the codeine they gave me. I'm still a bit groggy and shouldn't be coding.) I checked the errata, but no dice. Has anyone else worked through those and are you seeing the same thing?


Recovery time can be useful

ajt on 2004-10-03T15:39:23

When I went into hospital last year, to have my cancer removed, I was able to read "Designing With Web Standards" by Zeldman. A very interesting book, and though he was preaching to the converted in me, I found it a very useful book from the business perspective.

I personally don't like TT2, I think it's a fundamentally flawed design, but for a broken design, it's quite a powerful implementation, and with the help of the book I've been able to get quite a bit out of it. I personally like the idea of XSLT for templating, but while I think that's good in principle, I don't think much of the implementation...

Re:Recovery time can be useful

Ovid on 2004-10-03T16:05:29

I didn't know you had cancer. Is everything OK now?

What don't you like you about TT2? Some people don't like templating systems as a matter of preference but it sounds like your reasoning goes beyond that (hence the XSLT reference?)

Re:Recovery time can be useful

ajt on 2004-10-03T20:33:26

Everything seems to be okay, but I have to live in hope it stays that way. Next Friday is my next CT scan, everything is okay at the moment, and I'm hoping that confirms it. Once that's done I'll have been a year clear, and the odds of a full, and medication free recovery increase significantly thereafter.

I know they do their best, but there is all sorts of code mixed up with the mark-up. It's better than ASP/JSP, but I still believe it's a flawed design. For example the templates aren't valid mark-up so you can't test them during development, and you can't be sure that the output will be valid too. I like the idea of XSLT (I worked at Inso where some of it was invented), I just don't like how it's been implemented.

I'll have to think through my ideas so that I can try and express them better, as I doubt I'm making sense this late at night...