Server/PreFork.pm

filter: Statementstmt 100% 6 / 6 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 8 / 8 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Server/Base.pm ↑ Summary
1 package Catalyst::Engine::Server::PreFork;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use base 'Catalyst::Engine::Server::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =head1 NAME
7  
8 Catalyst::Engine::Server::PreFork - Catalyst Server Engine
9  
10 =head1 SYNOPSIS
11  
12 A script using the Catalyst::Engine::Server::PreFork module might look like:
13  
14 #!/usr/bin/perl -w
15  
16 BEGIN {
17 $ENV{CATALYST_ENGINE} = 'Server::PreFork';
18 }
19  
20 use strict;
21 use lib '/path/to/MyApp/lib';
22 use MyApp;
23  
24 MyApp->run;
25  
26 =head1 DESCRIPTION
27  
28 This Catalyst engine specialized for standalone deployment.
29  
30 =head1 OVERLOADED METHODS
31  
32 This class overloads some methods from C<Catalyst::Engine::Server::Base>.
33  
34 =over 4
35  
36 =item $c->run
37  
38 =cut
39  
40 sub run {
41 my $class = shift;
42  
43 my $server = Catalyst::Engine::Server::Net::Server::PreFork->new;
44 $server->application($class);
45 $server->run(@_);
46 }
47  
48 =back
49  
50 =head1 SEE ALSO
51  
52 L<Catalyst>, L<Catalyst::Engine::Server::Base>, L<Net::Server::PreFork>.
53  
54 =head1 AUTHOR
55  
56 Christian Hansen, C<ch@ngmedia.com>
57  
58 =head1 COPYRIGHT
59  
60 This program is free software, you can redistribute it and/or modify it under
61 the same terms as Perl itself.
62  
63 =cut
64  
65 package Catalyst::Engine::Server::Net::Server::PreFork;
66  
67 use strict;
68 use base qw[Catalyst::Engine::Server::Net::Server Net::Server::PreFork];
69  
70 1;
« Server/Base.pm ↑ Summary