Voldemort/ProtoBuff/BaseMessage.pm

filter: Statementstmt 88.8% 16 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 91.6% 22 / 24 CC 1 SCAR 0.5
CC
1
Cov
89%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Voldemort/ProtoBuff/Connection.pm ↑ Summary Voldemort/ProtoBuff/PutMessage.pm »
1 package Voldemort::ProtoBuff::BaseMessage;
2  
3 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use IO::Select;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Scalar::Util qw(reftype);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use Voldemort::Message;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 0 ▶use Voldemort::ProtoBuff::Spec2;
Subroutine BEGIN: called CC=1 SCAR=2.6
10  
11 with 'Voldemort::Message';
12  
13 sub write {
14 carp "Implement write";
15 return;
16 }
17  
18 sub _get_entries {
19 shift;
20 my $node = shift;
21 my @nodes = ($node);
22 my $ref = reftype $node;
23  
24 @nodes = @$node if ( defined $ref and $ref eq 'ARRAY' );
25  
26 my $time = time();
27 my @result;
28 foreach my $node (@nodes) {
29 push(
30 @result,
31 Voldemort::ProtoBuff::Spec2::ClockEntry->new(
32 {
33 node_id => $node,
34 version => time()
35 }
36 )
37 );
38 }
39 return \@result;
40 }
41  
42 sub read {
43 carp "Implement write";
44 return;
45 }
46 1;
47  
« Voldemort/ProtoBuff/Connection.pm ↑ Summary Voldemort/ProtoBuff/PutMessage.pm »