Perl FastCGI Scripts

From Dev411: The Code Wiki

An easy way to get FastCGI running with Perl scripts is to use mod_fastcgi or mod_fcgid with Apache. Installing both Apache modules is covered in [Installing Typo: MySQL, Apache, lighttpd and FastCGI].

Once you have the modules loaded specify the .fcgi extension by adding either of the following to your httpd.conf:

AddHandler fastcgi-script .fcgi
AddHandler fcgid-script .fcgi

If your Perl scripts use CGI.pm simply change them to use CGI::Fast, a subclass of CGI.pm that is included:

use CGI::Fast;
my $q = CGI::Fast->new

For larger applications, consider the Catalyst framework which supports FastCGI, mod_perl 1.3.x and mod_perl 2.x out of the box.