in reply to Re^2: Template modules, logic, and SOC
in thread Template modules, logic, and SOC

Don't get me wrong, I kind of like the system you described, for a templating system :-).

One of the problems I can see, though, is that for some kinds of output you'll either end up writing "one-off" callbacks, which means you'll now have highly integrated code and template fragments that you'll need to keep in sync spread over multiple files.

In those cases, you may be better off either writing a function that just returns the complete HTML fragment, or putting the formatting details in code in the template directly, just to make it clear what's going on.

Replies are listed 'Best First'.
Re^4: Template modules, logic, and SOC
by arbingersys (Pilgrim) on Jan 23, 2008 at 21:01 UTC

    you'll... end up writing "one-off" callbacks

    Yeah, I can see this happening. There was once or twice while working on Sylbi where it seemed like a waste to call a template because the section I was rendering was so small. Of course, you can stuff template sections in __DATA__...