| 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
| |||||||||||||||||||||||||||||
| 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
Condition33%1/3
builtin::blessed($request_to_cancel) and $request_to_cancel->isa("Future")
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")
| |||||||||||||||||||||||||||||
| 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; | |||||||||||||||||||||||||||