Mojolicious/Command/psgi.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
__ANON__
1.0
CRAP 1.0
« Mojolicious/Command/Author/generate/makefile.pm ↑ Summary Mojolicious/Plugin.pm »
1 package Mojolicious::Command::psgi;
2 1 ▶use Mojo::Base 'Mojolicious::Command';
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 1 ▶use Mojo::Server::PSGI;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 has description => 'Start application with PSGI';
7 1 ▶has usage => sub { shift->extract_usage };
Subroutine __ANON__: called CC=1 SCAR=0.0
8  
9 4 ▶sub run { Mojo::Server::PSGI->new(app => shift->app)->to_psgi_app }
Subroutine run: called CC=1 SCAR=0.0
Pod documented
10  
11 1 1;
12  
13 =encoding utf8
14  
15 =head1 NAME
16  
17 Mojolicious::Command::psgi - PSGI command
18  
19 =head1 SYNOPSIS
20  
21 Usage: APPLICATION psgi [OPTIONS]
22  
23 ./myapp.pl psgi
24  
25 Options:
26 -h, --help Show this summary of available options
27 --home <path> Path to home directory of your application, defaults to
28 the value of MOJO_HOME or auto-detection
29 -m, --mode <name> Operating mode for your application, defaults to the
30 value of MOJO_MODE/PLACK_ENV or "development"
31  
32 =head1 DESCRIPTION
33  
34 L<Mojolicious::Command::psgi> starts applications with the L<Mojo::Server::PSGI> backend.
35  
36 This is a core command, that means it is always enabled and its code a good example for learning to build new commands,
37 you're welcome to fork it.
38  
39 See L<Mojolicious::Commands/"COMMANDS"> for a list of commands that are available by default.
40  
41 =head1 ATTRIBUTES
42  
43 L<Mojolicious::Command::psgi> inherits all attributes from L<Mojolicious::Command> and implements the following new
44 ones.
45  
46 =head2 description
47  
48 my $description = $psgi->description;
49 $psgi = $psgi->description('Foo');
50  
51 Short description of this command, used for the command list.
52  
53 =head2 usage
54  
55 my $usage = $psgi->usage;
56 $psgi = $psgi->usage('Foo');
57  
58 Usage information for this command, used for the help screen.
59  
60 =head1 METHODS
61  
62 L<Mojolicious::Command::psgi> inherits all methods from L<Mojolicious::Command> and implements the following new ones.
63  
64 =head2 run
65  
66 my $app = $psgi->run;
67  
68 Run this command.
69  
70 =head1 SEE ALSO
71  
72 L<Mojolicious>, L<Mojolicious::Guides>, L<https://mojolicious.org>.
73  
74 =cut
« Mojolicious/Command/Author/generate/makefile.pm ↑ Summary Mojolicious/Plugin.pm »