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


in reply to CGI.pm HTML shortcuts, Better Way?

Cool idea. However, templating systems are great. By being able to make components that get reused throughout the site you can change the look of the site quickly and consistently if you want to.

Nothing in most template systems requires 1 page -> 1 file. Most of my recent experience is with Mason and I have made pages that generate themselves differently depending on which step in the process this is.

However, I have more recently bought into the component model that Mason allows and have started breaking up pages into multiple smaller re-usable chunks. So I no longer try to condense multiple pages down into 1 file (unless it is a simple submit page that shows the status of the submit on the second viewing) and I have found that this makes things much simpler. It is easier to write and debug since I can usually determine which file the problem is in at a glance, and then each file is smaller and simpler so I can usually see the problem pretty quickly.

-ben