(You are Anonymous)

Using Fast::CGI with CGI::Application

Fast CGI is one approach to overcome the performance penalty of serving dynamic pages using the CGI interface.

Its main advantage over Mod Perl is that it is not so tightly integrated with the Apache web server, so you can use it in situations when you do not have full control over the web server (a situation often found when your site is hosted on someone else's server), when you want to protect your web server from any harm your program might cause to it, or when you use a different web server than Apache. You can also use Fast CGI with other programming languages than Perl, and place the Fast CGI processes on additional servers different from the web server.

One thing to keep in mind with Fast CGI is that you cannot use the normal CGI.pm, but have to use a special submodule CGI::Fast (included in your CGI.pm distribution). It works like this:

use CGI::Fast();

while (my $q = new CGI::Fast){
   my $app = new MyCGIApplication(QUERY => $q);   # this is your CGI::App module

See Also