X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FEngine%2FFastCGI.pm;h=2eb34cda3ad34ca7e3a0bee1ea00d16755927c44;hp=1697558cdbe950b3cf901a953718e9292a8c9457;hb=6f409682667c23a00552d0573c157ee3487c29bc;hpb=255b19ac18c639bc8e5b79d711f6e68c4f77b116 diff --git a/lib/Catalyst/Engine/FastCGI.pm b/lib/Catalyst/Engine/FastCGI.pm index 1697558..2eb34cd 100644 --- a/lib/Catalyst/Engine/FastCGI.pm +++ b/lib/Catalyst/Engine/FastCGI.pm @@ -2,7 +2,8 @@ package Catalyst::Engine::FastCGI; use strict; use base 'Catalyst::Engine::CGI'; -use FCGI; +eval "use FCGI"; +die "Please install FCGI\n" if $@; =head1 NAME @@ -62,7 +63,7 @@ sub run { } $options ||= {}; - + my %env; my $request = @@ -71,18 +72,18 @@ sub run { ); my $proc_manager; - - if ( $listen ) { + + if ($listen) { require FCGI::ProcManager; $options->{nproc} ||= 1; - - $proc_manager - = FCGI::ProcManager->new( { n_processes => $options->{nproc} } ); - + + $proc_manager = + FCGI::ProcManager->new( { n_processes => $options->{nproc} } ); + if ( $options->{pidfile} ) { $proc_manager->pm_write_pid_file( $options->{pidfile} ); } - + $proc_manager->pm_manage(); }