My reason for using CGI::Application also stems from trying to follow the MVC pattern. CGI::Application acts as the Controller and suggests using HTML::Template for the Views (although many people use TT in place of H::T). For the Model I usually create Class::DBI modules of my tables and litter them with many helper functions.
The other reason why CGI::Application is so good to use with mod_perl is that the actual CGI script is very small. All of the code is put into modules. The reason this is important when using mod_perl is explained by tilly's comment above. The actual CGI script is only a couple of lines long and hence you will not have problems with the "Cannot stay shared" issues that many legacy CGI scripts suffer from.
I'm not trying to turn this into a 'My Way is better than Your Way". But something you should get out of this, is that it is very beneficial to place the majority of your code into modules instead of building a monolithic script littered with functions, especially when you are using mod_perl.
- Cees
In reply to Re: Re: Re: thinking about mod_perl
by cees
in thread thinking about mod_perl
by geektron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |