http://www.perlmonks.org?node_id=371186


in reply to HTML - separating design and logic

You could also drive your "nodelet_title" / "nodelet_contents" method within a Nodelet class, which, when subclassed, fills nodelet_contents from its own private template file.

So you end up with a top-level display module, and each of the "objects" contained within are able to generate their own contents, possibly through their own templates. I am currently using this, am able to keep the logic and display seperate, and have not run into too many problems.

Most of y problems come down to data structures, and shifting between structures for the program and structures for the display (H::T) has been reduced to a couple of translation routines.

--MidLifeXis