Riak.pm

filter: Statementstmt 88.4% 23 / 26 Branchbran n/a Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 83.3% 5 / 6 Podpod 100% 2 / 2 totaltotal 89.1% 33 / 37 CC 2 SCAR 3.6
CC
2
Cov
89%
BUILDARGS
2.0
bucket
2.0
BEGIN
1.0
CRAP 1.4
« Riak/Link.pm ↑ Summary Riak/LinkPhase.pm »
1 package Net::Riak;
2 {
3 21 $Net::Riak::VERSION = '0.1702';
4 }
5  
6 # ABSTRACT: Interface to Riak
7  
8 21 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 21 ▶use Net::Riak::Client;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 21 ▶use Net::Riak::Bucket;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 21 ▶use Net::Riak::Types Client => { -as => 'Client_T' };
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 21 with 'Net::Riak::Role::MapReduce';
15  
16 21 has client => (
17 is => 'rw',
18 isa => Client_T,
19 required => 1,
20 handles => [qw/is_alive all_buckets server_info stats search index setup_indexing/]
21 );
22  
23 3 ▶sub BUILDARGS {
Subroutine BUILDARGS: called CC=2 SCAR=6.9
Pod documented
24 3 my ($class, %args) = @_;
25  
26 3 ▶ my $transport = $args{transport} || 'REST';
Condition100%2/2
$args{'transport'} || 'REST'
l!l
12
MC/DC100%1/1
$args{'transport'} || 'REST'
$args{'transport'}
Truth table100%2/2
A
A= $args{'transport'}
Aresult
11
00
27 3 my $trait = "Net::Riak::Transport::".$transport;
28  
29 3 my $client = Net::Riak::Client->with_traits($trait)->new(%args);
30 2 $args{client} = $client;
31 2 \%args;
32 }
33  
34 0 ▶sub bucket {
Subroutine bucket: not called CC=1 SCAR=6.9
Pod documented
35 0 my ($self, $name) = @_;
36 0 my $bucket = Net::Riak::Bucket->new(name => $name, client => $self->client);
37 0 $bucket;
38 }
39  
40 21 1;
41  
42 __END__
« Riak/Link.pm ↑ Summary Riak/LinkPhase.pm »