blib/lib/PLS/Server/Request/CancelRequest.pm

filter: Statementstmt 100% 21 / 21 Branchbran 50.0% 2 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 80.5% 29 / 36 CC 4 SCAR 9.8
CC
4
Cov
86%
service
4.3
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« /usr/local/bin/perldoc ↑ Summary blib/lib/PLS/Server/Response/Formatting.pm »
1 package PLS::Server::Request::CancelRequest;
2  
3 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 13 ▶use parent 'PLS::Server::Request';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 13 ▶use Scalar::Util qw(blessed);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 =head1 NAME
11  
12 PLS::Server::Request::CancelRequest
13  
14 =head1 DESCRIPTION
15  
16 This is a notification message from the client to the server requesting
17 that a request be cancelled.
18  
19 =cut
20  
21 sub service
22 1 ▶{
Subroutine service: called CC=4 SCAR=14.6
Pod undocumented
23 1 my ($self, $server) = @_;
24  
25 1 my $id = $self->{params}{id};
26 1 ▶ return unless (exists $server->{running_futures}{$id});
Branch: 1 branch
BranchTrueFalseTotal
unless exists $server->{"running_futures"}{$id} 0 1 1
27 1 my $request_to_cancel = $server->{running_futures}{$id};
28  
29 1 ▶ return unless (blessed($request_to_cancel) and $request_to_cancel->isa('Future'));
Branch: 1 branch
BranchTrueFalseTotal
unless builtin::blessed($request_to_cancel) and $request_to_cancel->isa("Future") 0 1 1
Condition33%1/3
builtin::blessed($request_to_cancel) and $request_to_cancel->isa("Future")
!ll&&!rl&&r
001
MC/DC0%0/2
builtin::blessed($request_to_cancel) and $request_to_cancel->isa("Future")
builtin::blessed($request_to_cancel) $request_to_cancel->isa("Future")
Truth table33%1/3
A and B
A= builtin::blessed($request_to_cancel)B= $request_to_cancel->isa("Future")
ABresult
0X0
100
111
30 1 $request_to_cancel->cancel();
31  
32 1 delete $server->{running_futures}{$id};
33  
34 1 return;
35 } ## end sub service
36  
37 13 1;
« /usr/local/bin/perldoc ↑ Summary blib/lib/PLS/Server/Response/Formatting.pm »