Riak/Transport/PBC/Code.pm

filter: Statementstmt 61.9% 13 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 42.8% 3 / 7 Podpod 0.0% 0 / 4 totaltotal 50.0% 16 / 32 CC 1 SCAR 4.5
CC
1
Cov
62%
EXPECTED_RESP
2.0
RESP_CLASS
2.0
RESP_DECODER
2.0
CRAP 1.6
« Riak/Role/Base.pm ↑ Summary Riak/Role/UserAgent.pm »
1 package Net::Riak::Transport::PBC::Code;
2 {
3 1 $Net::Riak::Transport::PBC::Code::VERSION = '0.1702';
4 }
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use base 'Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 our @EXPORT_OK = qw/
10 REQ_CODE
11 RESP_CLASS
12 EXPECTED_RESP
13 RESP_DECODER
14 /;
15  
16 0 ▶sub EXPECTED_RESP {
Subroutine EXPECTED_RESP: not called CC=1 SCAR=6.9
Pod undocumented
17 0 my $code = shift;
18 return {
19 1 => 2,
20 3 => 4,
21 5 => 6,
22 7 => 8,
23 9 => 10,
24 11 => 12,
25 13 => 14,
26 15 => 16,
27 17 => 18,
28 19 => 20,
29 21 => 22,
30 23 => 24,
31 0 }->{$code};
32 }
33 0 ▶sub RESP_CLASS {
Subroutine RESP_CLASS: not called CC=1 SCAR=6.9
Pod undocumented
34 0 my $code = shift;
35  
36 return {
37 0 => 'RpbErrorResp',
38 2 => 'RpbPingResp',
39 4 => 'RpbGetClientIdResp',
40 6 => 'RpbSetClientIdResp',
41 8 => 'RpbGetServerInfoResp',
42 10 => 'RpbGetResp',
43 12 => 'RpbPutResp',
44 14 => 'RpbDelResp',
45 16 => 'RpbListBucketsResp',
46 18 => 'RpbListKeysResp',
47 20 => 'RpbGetBucketResp',
48 22 => 'RpbSetBucketResp',
49 24 => 'RpbMapRedResp',
50 0 }->{$code};
51 }
52  
53 0 ▶sub RESP_DECODER {
Subroutine RESP_DECODER: not called CC=1 SCAR=6.9
Pod undocumented
54 0 my $code = shift;
55  
56 return {
57 0 => 'RpbErrorResp',
58 2 => undef,
59 4 => 'RpbGetClientIdResp',
60 6 => undef,
61 8 => 'RpbGetServerInfoResp',
62 10 => 'RpbGetResp',
63 12 => 'RpbPutResp',
64 14 => undef,
65 16 => 'RpbListBucketsResp',
66 18 => 'RpbListKeysResp',
67 20 => 'RpbGetBucketResp',
68 22 => undef,
69 24 => 'RpbMapRedResp'
70 0 }->{$code};
71 };
72  
73  
74 0 ▶sub REQ_CODE {
Subroutine REQ_CODE: not called CC=1 SCAR=6.9
Pod undocumented
75 0 my $class = shift;
76  
77 return {
78 RpbPingReq => 1,
79 RpbGetClientIdReq => 3,
80 RpbSetClientIdReq => 5,
81 RpbGetServerInfoReq => 7,
82 RpbGetReq => 9,
83 RpbPutReq => 11,
84 RpbDelReq => 13,
85 RpbListBucketsReq => 15,
86 RpbListKeysReq => 17,
87 RpbGetBucketReq => 19,
88 RpbSetBucketReq => 21,
89 RpbMapRedReq => 23,
90 0 }->{$class};
91 }
92  
93 1 1;
94  
95 __END__
« Riak/Role/Base.pm ↑ Summary Riak/Role/UserAgent.pm »