| Bryar documentation | Contained in the Bryar distribution. |
Bryar::Frontend::FastCGI - FastCGI interface to Bryar
my $bryar = Bryar->new(frontend => 'Bryar::Frontend::FastCGI');
while (my $q = new CGI::Fast) {
$bryar->config->frontend->fastcgi_request($q);
eval { $bryar->go };
}
This is a frontend to Bryar which is used when Bryar is being driven as a persistent CGI using a FastCGI-enabled web server.
$frontend->fastcgi_request($q)
Used to pass the new CGI::Fast object inside the requests loop.
This module is free software, and may be distributed under the same terms as Perl itself.
Copyright (C) 2003, Simon Cozens simon@kasei.com
Copyright (C) 2008, Marco d'Itri md@Linux.IT
| Bryar documentation | Contained in the Bryar distribution. |
package Bryar::Frontend::FastCGI; use base 'Bryar::Frontend::CGI'; use 5.006; use strict; use warnings; our $VERSION = '1.0';
sub new { my $class = shift; bless { @_ }, $class; } sub obtain_url { shift->{fcgi}->url } sub obtain_path_info { shift->{fcgi}->path_info } sub obtain_params { my $self = shift; map { $_ => $self->{fcgi}->param($_) } $self->{fcgi}->param } sub get_header { my $self = shift; $self->{fcgi}->http(shift) }
sub fastcgi_request { my ($self, $q) = @_; $self->{fcgi} = $q; } 1;