You don't need *any* modules to do this sort of thing. Just structure your code so you have one section that displays output and another section that decides what to output and a third section to link the two.
However there are several modules that make this sort of thing easier. My current favorites are CGI::Application and HTML::Template. HTML::Template is a basic, but extremely fast and well designed templating engine that takes basic templates and fills them with paramaters. CGI::Application is a parent class that makes designing CGI state machines much simpler. Together they let you design clean, well structured code, so that each portion focuses on one specific task.
CGI::Applications work by having several "run modes", which basically states in your state machine, if you think of it that way. Typically every page that is displayed to a user is a run mode, and typically these run modes invoke html::template for the actual html generation. In this case, the specific run mode is the "Model" code, while the template you are displaying is the "View" code, and the CGI::Application base class provides the "Controller" code. | [reply] |
Check out Re: Why CGI::Application (and its replies) for how to design a C::A application. There are tons of good C::A nodes on Perlmonks.
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
| [reply] |