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 9     9   54 use strict;
  9         19  
  9         225  
4 9     9   29 use warnings;
  9         18  
  9         182  
5              
6 9     9   45 use parent 'PLS::Server::Request';
  9         18  
  9         36  
7              
8 9     9   397 use PLS::Server::State;
  9         18  
  9         702  
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 7 my ($self, $server) = @_;
24              
25 2 100       8 my $exit_code = $PLS::Server::State::SHUTDOWN ? 0 : 1;
26 2         10 $server->stop($exit_code);
27              
28 2         4 return;
29             } ## end sub service
30              
31             1;