File Coverage

blib/lib/PLS/Server/Request/Exit.pm
Criterion Covered Total %
statement 16 16 100.0
branch 2 2 100.0
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 23 24 95.8


line stmt bran cond sub pod time code
1             package PLS::Server::Request::Exit;
2              
3 11     11   84 use strict;
  11         180  
  11         628  
4 11     11   126 use warnings;
  11         26  
  11         719  
5              
6 11     11   72 use parent 'PLS::Server::Request';
  11         14  
  11         80  
7              
8 11     11   970 use PLS::Server::State;
  11         27  
  11         1593  
9              
10             =head1 NAME
11              
12             PLS::Server::Request::Exit
13              
14             =head1 DESCRIPTION
15              
16             This is a notification message from the client to the server requesting
17             that the server exits.
18              
19             =cut
20              
21             sub service
22             {
23 2     2 0 28 my ($self, $server) = @_;
24              
25 2 100       31 my $exit_code = $PLS::Server::State::SHUTDOWN ? 0 : 1;
26 2         17 $server->stop($exit_code);
27              
28 2         7 return;
29             } ## end sub service
30              
31             1;