You should also take a look at
CGI::Application. From the docs: "CGI::Application is intended to make it easier to create sophisticated, reusable web-based applications. This module implements a methodology which, if followed, will make your web software easier to design, easier to document, easier to write, and easier to evolve."
Reclaw
Your mileage may very.