line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Couchbase::Client::Async; |
2
|
3
|
|
|
3
|
|
1110
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
95
|
|
3
|
3
|
|
|
3
|
|
11
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
98
|
|
4
|
|
|
|
|
|
|
our $VERSION = '2.0.0_1'; |
5
|
3
|
|
|
3
|
|
13
|
use Couchbase::Client; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
39
|
|
6
|
3
|
|
|
3
|
|
12
|
use Couchbase::Client::IDXConst; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
825
|
|
7
|
3
|
|
|
3
|
|
647
|
use Log::Fu; |
|
3
|
|
|
|
|
27980
|
|
|
3
|
|
|
|
|
24
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
0
|
|
|
0
|
0
|
|
my ($cls,$options) = @_; |
12
|
0
|
|
|
|
|
|
my @async_keys = qw( |
13
|
|
|
|
|
|
|
cb_update_event |
14
|
|
|
|
|
|
|
cb_error |
15
|
|
|
|
|
|
|
cb_waitdone |
16
|
|
|
|
|
|
|
cb_update_timer |
17
|
|
|
|
|
|
|
bless_events |
18
|
|
|
|
|
|
|
); |
19
|
0
|
|
|
|
|
|
my %async_opts; |
20
|
0
|
|
|
|
|
|
@async_opts{@async_keys} = delete @{$options}{@async_keys}; |
|
0
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my $arglist = Couchbase::Client::_MkCtorIDX($options); |
23
|
|
|
|
|
|
|
|
24
|
0
|
0
|
0
|
|
|
|
$arglist->[CTORIDX_CBEVMOD] = delete $async_opts{cb_update_event} |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
25
|
|
|
|
|
|
|
and |
26
|
|
|
|
|
|
|
$arglist->[CTORIDX_CBERR] = delete $async_opts{cb_error} |
27
|
|
|
|
|
|
|
and |
28
|
|
|
|
|
|
|
$arglist->[CTORIDX_CBWAITDONE] = delete $async_opts{cb_waitdone} |
29
|
|
|
|
|
|
|
and |
30
|
|
|
|
|
|
|
$arglist->[CTORIDX_CBTIMERMOD] = delete $async_opts{cb_update_timer} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
or die "We require update_event, error, and wait_done callbacks"; |
33
|
|
|
|
|
|
|
|
34
|
0
|
0
|
|
|
|
|
if($async_opts{bless_events}) { |
35
|
0
|
|
|
|
|
|
$arglist->[CTORIDX_BLESS_EVENT] = 1; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
my $o = $cls->construct($arglist); |
39
|
0
|
|
|
|
|
|
return $o; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
#Establish proxy methods: |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
foreach my $subname (qw( |
45
|
|
|
|
|
|
|
enable_compress |
46
|
|
|
|
|
|
|
compression_settings |
47
|
|
|
|
|
|
|
serialization_settings |
48
|
|
|
|
|
|
|
conversion_settings |
49
|
|
|
|
|
|
|
deconversion_settings |
50
|
|
|
|
|
|
|
compress_threshold |
51
|
|
|
|
|
|
|
timeout |
52
|
|
|
|
|
|
|
)) { |
53
|
3
|
|
|
3
|
|
1380
|
no strict 'refs'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
260
|
|
54
|
|
|
|
|
|
|
*{$subname} = sub { |
55
|
0
|
|
|
0
|
|
|
my ($self,@args) = @_; |
56
|
0
|
|
|
|
|
|
my $base = $self->_get_base_rv; |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
@_ = ($base, @args); |
59
|
0
|
|
|
|
|
|
goto &{"Couchbase::Client::$subname"}; |
|
0
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
}; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
__END__ |