updated Makefile.PL
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / FCGI.pm
CommitLineData
ffb41d94 1package Catalyst::Engine::FCGI;
2
3use strict;
4use base 'Catalyst::Engine::CGI';
5use FCGI;
6use NEXT;
7
8=head1 NAME
9
10Catalyst::Engine::FCGI - Catalyst FCGI Engine
11
12=head1 SYNOPSIS
13
14See L<Catalyst>.
15
16=head1 DESCRIPTION
17
18This is the Catalyst engine for FastCGI.
19
20=head1 OVERLOADED METHODS
21
22This class overloads some methods from C<Catalyst::Engine::CGI>.
23
24=over 4
25
26=item $c->run
27
28=cut
29
30sub run {
31 my $class = shift;
32 my $request = FCGI::Request();
33 while ( $request->Accept() >= 0 ) {
34 my $output;
35 {
36 local (*STDOUT);
37 open( STDOUT, '>', \$output );
38 $class->NEXT::run;
39 }
40 $output =~ s!^HTTP/\d+.\d+ \d\d\d.*?\n!!s;
41 print $output;
42 }
43}
44
45=back
46
47=head1 SEE ALSO
48
49L<Catalyst>.
50
51=head1 AUTHOR
52
53Sebastian Riedel, C<sri@cpan.org>
54
55=head1 COPYRIGHT
56
57This program is free software, you can redistribute it and/or modify it under
58the same terms as Perl itself.
59
60=cut
61
621;