line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
308425
|
use utf8; |
|
3
|
|
|
|
|
37
|
|
|
3
|
|
|
|
|
23
|
|
2
|
3
|
|
|
3
|
|
106
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
79
|
|
3
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
159
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package DR::Tnt; |
6
|
3
|
|
|
3
|
|
24
|
use base qw(Exporter); |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
603
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.21'; |
8
|
|
|
|
|
|
|
our @EXPORT = qw(tarantool); |
9
|
3
|
|
|
3
|
|
1871
|
use List::MoreUtils 'any'; |
|
3
|
|
|
|
|
47369
|
|
|
3
|
|
|
|
|
25
|
|
10
|
|
|
|
|
|
|
|
11
|
3
|
|
|
3
|
|
3929
|
use Carp; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
969
|
|
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__ |