| 1 | package Beekeeper::JSONRPC::Request; | ||||||||||||
| 2 | |||||||||||||
| 3 | 11 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 11 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 11 | our $VERSION = '0.10'; | |||||||||||
| 7 | |||||||||||||
| 8 | |||||||||||||
| 9 | 0 | ▶ | sub new { | ||||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 10 | 0 | my $class = shift; | |||||||||||
| 11 | 0 | bless { | |||||||||||
| 12 | jsonrpc => '2.0', | ||||||||||||
| 13 | method => undef, | ||||||||||||
| 14 | params => undef, | ||||||||||||
| 15 | id => undef, | ||||||||||||
| 16 | @_ | ||||||||||||
| 17 | }, $class; | ||||||||||||
| 18 | } | ||||||||||||
| 19 | |||||||||||||
| 20 | 0 | ▶ | sub method { $_[0]->{method} } | ||||||||||
|
Subroutine
method: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 21 | 0 | ▶ | sub params { $_[0]->{params} } | ||||||||||
|
Subroutine
params: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 22 | 0 | ▶ | sub id { $_[0]->{id} } | ||||||||||
|
Subroutine
id: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 23 | |||||||||||||
| 24 | 2 | ▶ | sub response { | ||||||||||
|
Subroutine
response: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 25 | 2 | $_[0]->{_response}; | |||||||||||
| 26 | } | ||||||||||||
| 27 | |||||||||||||
| 28 | 12 | ▶ | sub result { | ||||||||||
|
Subroutine
result: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 29 | # Shortcut for $req->response->result | ||||||||||||
| 30 | 12 | ▶ | return ($_[0]->{_response}) ? $_[0]->{_response}->{result} : undef; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 31 | } | ||||||||||||
| 32 | |||||||||||||
| 33 | 2 | ▶ | sub success { | ||||||||||
|
Subroutine
success: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 34 | # Shortcut for $req->response->success | ||||||||||||
| 35 | 2 | ▶ | return ($_[0]->{_response}) ? $_[0]->{_response}->success : undef; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 36 | } | ||||||||||||
| 37 | |||||||||||||
| 38 | 0 | ▶ | sub mqtt_properties { | ||||||||||
|
Subroutine
mqtt_properties: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 39 | 0 | $_[0]->{_mqtt_properties}; | |||||||||||
| 40 | } | ||||||||||||
| 41 | |||||||||||||
| 42 | 0 | ▶ | sub async_response { | ||||||||||
|
Subroutine
async_response: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 43 | 0 | $_[0]->{_async_response} = 1; | |||||||||||
| 44 | } | ||||||||||||
| 45 | |||||||||||||
| 46 | 0 | ▶ | sub deflate_response { | ||||||||||
|
Subroutine
deflate_response: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 47 | 0 | ▶ | $_[0]->{_deflate_response} = $_[2] || 1024; | ||||||||||
|
Condition0%0/2
$_[2] || 1024
MC/DC0%0/1
$_[2] || 1024
$_[2]
Truth table0%0/2
A
A= $_[2]
| |||||||||||||
| 48 | } | ||||||||||||
| 49 | |||||||||||||
| 50 | 0 | ▶ | sub send_response { | ||||||||||
|
Subroutine
send_response: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 51 | 0 | $_[0]->{_worker}->__send_response(@_); | |||||||||||
| 52 | } | ||||||||||||
| 53 | |||||||||||||
| 54 | 11 | 1; | |||||||||||
| 55 | |||||||||||||
| 56 | __END__ | ||||||||||||