Tatsuhiko Miyagawa > Plack-0.99_01 > Plack::Handler::CGI

Download:
Plack-0.99_01.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Source   Latest Release: Plack-1.0033

SYNOPSIS ^

Want to run PSGI application as a CGI script? Rename .psgi to .cgi and change the shebang line like:

  #!/usr/bin/env plackup
  # rest of the file can be the same as other .psgi file

You can alternatively create a file that contains something like:

  #!/usr/bin/perl
  use Plack::Loader;
  my $app = Plack::Util::load_psgi("/path/to/app.psgi");
  Plack::Loader->auto->run($app);

This will auto-recognize the CGI environment variable to load this class.

If you really want to explicitly load the CGI handler, for instance when you want to embed a PSGI application server built into CGI-compatible perl based web server:

  use Plack::Handler::CGI;
  Plack::Handler::CGI->new->run($app);

DESCRIPTION ^

This is a handler module to run any PSGI application as a CGI script.

SEE ALSO ^

Plack::Handler

syntax highlighting: