1Plack::App::WrapCGI(3)User Contributed Perl DocumentationPlack::App::WrapCGI(3)
2
3
4
6 Plack::App::WrapCGI - Compiles a CGI script as PSGI application
7
9 use Plack::App::WrapCGI;
10
11 my $app = Plack::App::WrapCGI->new(script => "/path/to/script.pl")->to_app;
12
13 # if you want to execute as a real CGI script
14 my $app = Plack::App::WrapCGI->new(script => "/path/to/script.rb", execute => 1)->to_app;
15
17 Plack::App::WrapCGI compiles a CGI script into a PSGI application using
18 CGI::Compile and CGI::Emulate::PSGI, and runs it with any PSGI server
19 as a PSGI application.
20
21 See also Plack::App::CGIBin if you have a directory that contains a lot
22 of CGI scripts and serve them like Apache's mod_cgi.
23
25 new
26 my $app = Plack::App::WrapCGI->new(%args);
27
28 Creates a new PSGI application using the given script. %args has
29 two parameters:
30
31 script The path to a CGI-style program. This is a required
32 parameter.
33
34 execute An optional parameter. When set to a true value, this app
35 will run the script with a CGI-style "fork"/"exec" model.
36 Note that you may run programs written in other languages
37 with this approach.
38
40 Tatsuhiko Miyagawa
41
43 Plack::App::CGIBin
44
45
46
47perl v5.30.1 2020-01-30 Plack::App::WrapCGI(3)