Riak/MapReducePhase.pm

filter: Statementstmt 70.8% 17 / 24 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 1 totaltotal 62.5% 20 / 32 CC 2 SCAR 9.9
CC
2
Cov
65%
to_array
6.0
__ANON__
1.1
BEGIN
1.0
CRAP 2.7
« Riak/Role/REST.pm ↑ Summary Riak/Role/Hosts.pm »
1 package Net::Riak::MapReducePhase;
2 {
3 21 $Net::Riak::MapReducePhase::VERSION = '0.1702';
4 }
5  
6 21 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 21 ▶use Scalar::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 21 ▶use JSON;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 21 has type => (is => 'rw', isa => 'Str', required => 1,);
11 21 has function => (is => 'ro', isa => 'Str', required => 1);
12 21 has arg => (is => 'ro', isa => 'ArrayRef', default => 'None');
13 21 has language => (is => 'ro', isa => 'Str', default => 'javascript');
14 0 ▶has keep => (is => 'rw', isa => 'JSON::Boolean', default => sub {JSON::false});
Subroutine __ANON__: not called CC=1 SCAR=1.2
15  
16 0 ▶sub to_array {
Subroutine to_array: not called CC=2 SCAR=17.9
Pod undocumented
17 0 my $self = shift;
18  
19 0 my $step_def = {
20 keep => $self->keep,
21 language => $self->language,
22 arg => $self->arg
23 };
24  
25 0 ▶ if ($self->function =~ m!\{!) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->function =~ /\{/) { } 0 0 0
26 0 $step_def->{source} = $self->function;
27 }else{
28 0 $step_def->{name} = $self->function;
29 }
30 0 return {$self->type => $step_def};
31 }
32  
33 21 1;
34  
35 __END__
« Riak/Role/REST.pm ↑ Summary Riak/Role/Hosts.pm »