line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Couchbase::Client::Async; |
2
|
1
|
|
|
1
|
|
3539
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
40
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.0.2'; |
5
|
1
|
|
|
1
|
|
6
|
use Couchbase::Client; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
6
|
1
|
|
|
1
|
|
7
|
use Couchbase::Client::IDXConst; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
298
|
|
7
|
1
|
|
|
1
|
|
603
|
use Log::Fu; |
|
1
|
|
|
|
|
33024
|
|
|
1
|
|
|
|
|
5
|
|
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
|
1
|
|
|
1
|
|
403
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
85
|
|
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__ |