NAME
Catalyst::Engine::CGI - The CGI Engine
SYNOPSIS
A script using the Catalyst::Engine::CGI module might look like:
#!/usr/bin/perl -w
use strict;
use lib '/path/to/MyApp/lib';
use MyApp;
MyApp->run;
The application module (MyApp
) would use Catalyst
, which loads the appropriate engine module.
DESCRIPTION
This is the Catalyst engine specialized for the CGI environment (using the CGI::Simple
and CGI::Cookie
modules). Normally Catalyst will select the appropriate engine according to the environment that it detects, however you can force Catalyst to use the CGI engine by specifying the following in your application module:
use Catalyst qw(-Engine=CGI);
Catalyst::Engine::CGI generates a full set of HTTP headers, which means that applications using the engine must be be configured as "Non-parsed Headers" scripts (at least when running under Apache). To configure this under Apache name the starting with nph-
.
The performance of this way of using Catalyst is not expected to be useful in production applications, but it may be helpful for development.
METHODS
- $c->run
-
To be called from a CGI script to start the Catalyst application.
- $c->cgi
-
This config parameter contains the
CGI::Simple
object.
OVERLOADED METHODS
This class overloads some methods from Catalyst
.
- $c->finalize_headers
- $c->finalize_output
-
Prints the response output to STDOUT.
-
Sets up cookies.
- $c->prepare_headers
- $c->prepare_parameters
- $c->prepare_path
- $c->prepare_request
- $c->prepare_uploads
SEE ALSO
AUTHOR
Sebastian Riedel, sri@cpan.org
COPYRIGHT
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.