1Plack::Handler::CGI(3)User Contributed Perl DocumentationPlack::Handler::CGI(3)
2
3
4

NAME

6       Plack::Handler::CGI - CGI handler for Plack
7

SYNOPSIS

9       Want to run PSGI application as a CGI script? Rename .psgi to .cgi and
10       change the shebang line like:
11
12         #!/usr/bin/env plackup
13         # rest of the file can be the same as other .psgi file
14
15       You can alternatively create a .cgi file that contains something like:
16
17         #!/usr/bin/perl
18         use Plack::Loader;
19         my $app = Plack::Util::load_psgi("/path/to/app.psgi");
20         Plack::Loader->auto->run($app);
21
22       This will auto-recognize the CGI environment variable to load this
23       class.
24
25       If you really want to explicitly load the CGI handler, you can. For
26       instance you might do this when you want to embed a PSGI application
27       server built into CGI-compatible perl-based web server:
28
29         use Plack::Handler::CGI;
30         Plack::Handler::CGI->new->run($app);
31

DESCRIPTION

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

UTILITY METHODS

36   setup_env()
37         my $env = Plack::Handler::CGI->setup_env();
38         my $env = Plack::Handler::CGI->setup_env(\%override_env);
39
40       Sets up the PSGI environment hash for a CGI request from %ENV> and
41       returns it.  You can provide a hashref of key/value pairs to override
42       the defaults if you would like.
43

SEE ALSO

45       Plack
46
47
48
49perl v5.28.0                      2018-02-10            Plack::Handler::CGI(3)
Impressum