lib/DR/Tnt.pm

filter: Statementstmt 61.1% 22 / 36 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 75.0% 6 / 8 Podpod 100% 1 / 1 totaltotal 58.0% 29 / 50 SCAR 13.4
CC
3
Cov
55%
tarantool
12.0
__ANON__
2.0
BEGIN
1.0
CRAP 3.8
« lib/DR/Tnt/Msgpack/Types/Blob.pm ↑ Summary lib/DR/Tnt/Client/Sync.pm »
1 3 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package DR::Tnt;
6 3 ▶use base qw(Exporter);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 our $VERSION = '0.21';
8 3 our @EXPORT = qw(tarantool);
9 3 ▶use List::MoreUtils 'any';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 3 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 3 $Carp::Internal{ (__PACKAGE__) }++;
13  
14 sub tarantool {
15 0 ▶ my (%opts) = @_;
Subroutine tarantool: not called CC=3 SCAR=24.8
Pod documented
16  
17 0 ▶ my $driver = delete($opts{driver}) || 'sync';
Condition0%0/2
delete $opts{'driver'} || 'sync'
l!l
00
MC/DC0%0/1
delete $opts{'driver'} || 'sync'
delete $opts{'driver'}
Truth table0%0/2
A
A= delete $opts{'driver'}
Aresult
11
00
18
19 0 ▶ unless (any { $driver eq $_ } 'sync', 'ae', 'async', 'coro') {
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (&any(sub { $driver eq $_; } , "sync", "ae", "async", "coro")) 0 0 0
20 0 goto usage;
21 }
22  
23  
24 0 goto $driver;
25 0 sync:
26 require DR::Tnt::Client::Sync;
27 0 return DR::Tnt::Client::Sync->new(%opts);
28  
29 0 ae:
30 async:
31 0 require DR::Tnt::Client::AE;
32 0 return DR::Tnt::Client::AE->new(%opts);
33  
34 0 coro:
35 require DR::Tnt::Client::Coro;
36 0 return DR::Tnt::Client::Coro->new(%opts);
37  
38  
39 0 usage:
40 croak "Too few information about tarantool connection";
41 }
42  
43 3 1;
44  
45 __END__
« lib/DR/Tnt/Msgpack/Types/Blob.pm ↑ Summary lib/DR/Tnt/Client/Sync.pm »