line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Memcached::Client::Selector; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
2
|
|
|
2
|
|
3678
|
$Memcached::Client::Selector::VERSION = '2.01'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
# ABSTRACT: Abstract Base Class For Memcached::Client Selector |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
15
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
73
|
|
8
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
78
|
|
9
|
2
|
|
|
2
|
|
1275
|
use Memcached::Client::Log qw{LOG}; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
411
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
7
|
|
|
7
|
1
|
44
|
my $class = shift; |
14
|
7
|
|
|
|
|
29
|
my $self = bless {}, $class; |
15
|
7
|
|
|
|
|
116
|
return $self; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub log { |
20
|
0
|
|
|
0
|
1
|
0
|
my ($self, $format, @args) = @_; |
21
|
0
|
|
0
|
|
|
0
|
my $prefix = ref $self || $self; |
22
|
0
|
|
|
|
|
0
|
$prefix =~ s,Memcached::Client::Selector::,Selector/,; |
23
|
0
|
|
|
|
|
0
|
LOG ("$prefix> " . $format, @args); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub set_servers { |
28
|
1
|
|
|
1
|
1
|
13
|
die "You must implement set_servers"; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub get_server { |
33
|
1
|
|
|
1
|
1
|
8
|
die "You must implement get_sock"; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |