Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^3: CGI::Application - why?

by perrin (Chancellor)
on May 15, 2006 at 16:56 UTC ( #549544=note: print w/replies, xml ) Need Help??

in reply to Re^2: CGI::Application - why?
in thread CGI::Application - why?

CGI::Application is intended to help you map HTTP requests to method calls. You can use that however you like. A common approach is to make a set of related actions into one application, and then factor out all the common code into separate modules, reducing the actual runmode code as much as possible.

If you prefer, you can make every single action call a different module, but that would probably be massive overkill, especially since one runmode frequently calls another (e.g. if there are input errors you call the mode to show the form again, passing the errors along).