line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Furl::ConnectionCache; |
2
|
45
|
|
|
45
|
|
282
|
use strict; |
|
45
|
|
|
|
|
131
|
|
|
45
|
|
|
|
|
1082
|
|
3
|
45
|
|
|
45
|
|
201
|
use warnings; |
|
45
|
|
|
|
|
72
|
|
|
45
|
|
|
|
|
1039
|
|
4
|
45
|
|
|
45
|
|
11959
|
use utf8; |
|
45
|
|
|
|
|
433
|
|
|
45
|
|
|
|
|
214
|
|
5
|
|
|
|
|
|
|
|
6
|
32
|
|
|
32
|
0
|
1731
|
sub new { bless [''], shift } |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub steal { |
9
|
57
|
|
|
57
|
0
|
185
|
my ($self, $host, $port) = @_; |
10
|
57
|
100
|
|
|
|
298
|
if ($self->[0] eq "$host:$port") { |
11
|
26
|
|
|
|
|
59
|
my $sock = $self->[1]; |
12
|
26
|
|
|
|
|
58
|
@{$self} = (''); |
|
26
|
|
|
|
|
133
|
|
13
|
26
|
|
|
|
|
86
|
return $sock; |
14
|
|
|
|
|
|
|
} else { |
15
|
31
|
|
|
|
|
100
|
return undef; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub push { |
20
|
41
|
|
|
41
|
0
|
143
|
my ($self, $host, $port, $sock) = @_; |
21
|
41
|
|
|
|
|
151
|
$self->[0] = "$host:$port"; |
22
|
41
|
|
|
|
|
139
|
$self->[1] = $sock; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|