line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Furl::ConnectionCache; |
2
|
45
|
|
|
45
|
|
255
|
use strict; |
|
45
|
|
|
|
|
127
|
|
|
45
|
|
|
|
|
1111
|
|
3
|
45
|
|
|
45
|
|
199
|
use warnings; |
|
45
|
|
|
|
|
74
|
|
|
45
|
|
|
|
|
1080
|
|
4
|
45
|
|
|
45
|
|
12391
|
use utf8; |
|
45
|
|
|
|
|
427
|
|
|
45
|
|
|
|
|
196
|
|
5
|
|
|
|
|
|
|
|
6
|
32
|
|
|
32
|
0
|
1644
|
sub new { bless [''], shift } |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub steal { |
9
|
57
|
|
|
57
|
0
|
187
|
my ($self, $host, $port) = @_; |
10
|
57
|
100
|
|
|
|
299
|
if ($self->[0] eq "$host:$port") { |
11
|
26
|
|
|
|
|
53
|
my $sock = $self->[1]; |
12
|
26
|
|
|
|
|
51
|
@{$self} = (''); |
|
26
|
|
|
|
|
122
|
|
13
|
26
|
|
|
|
|
88
|
return $sock; |
14
|
|
|
|
|
|
|
} else { |
15
|
31
|
|
|
|
|
114
|
return undef; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub push { |
20
|
41
|
|
|
41
|
0
|
136
|
my ($self, $host, $port, $sock) = @_; |
21
|
41
|
|
|
|
|
141
|
$self->[0] = "$host:$port"; |
22
|
41
|
|
|
|
|
144
|
$self->[1] = $sock; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|