line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
196822
|
use utf8; |
|
3
|
|
|
|
|
31
|
|
|
3
|
|
|
|
|
19
|
|
2
|
3
|
|
|
3
|
|
78
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
64
|
|
3
|
3
|
|
|
3
|
|
9
|
use warnings; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
93
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package DR::Tnt; |
6
|
3
|
|
|
3
|
|
12
|
use base qw(Exporter); |
|
3
|
|
|
|
|
2
|
|
|
3
|
|
|
|
|
439
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.22'; |
8
|
|
|
|
|
|
|
our @EXPORT = qw(tarantool); |
9
|
3
|
|
|
3
|
|
1387
|
use List::MoreUtils 'any'; |
|
3
|
|
|
|
|
29672
|
|
|
3
|
|
|
|
|
19
|
|
10
|
|
|
|
|
|
|
|
11
|
3
|
|
|
3
|
|
2433
|
use Carp; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
605
|
|
12
|
|
|
|
|
|
|
$Carp::Internal{ (__PACKAGE__) }++; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub tarantool { |
15
|
0
|
|
|
0
|
1
|
|
my (%opts) = @_; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
0
|
|
|
|
my $driver = delete($opts{driver}) || 'sync'; |
18
|
|
|
|
|
|
|
|
19
|
0
|
0
|
|
0
|
|
|
unless (any { $driver eq $_ } 'sync', 'ae', 'async', 'coro') { |
|
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
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__END__ |