| 1 | package Furl::ConnectionCache; | ||||||||||
| 2 | 48 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 48 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 48 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 36 | ▶ | sub new { bless [''], shift } | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 7 | |||||||||||
| 8 | 69 | ▶ | sub steal { | ||||||||
|
Subroutine
steal: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 9 | 69 | my ($self, $host, $port) = @_; | |||||||||
| 10 | 69 | ▶ | if ($self->[0] eq "$host:$port") { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 11 | 26 | my $sock = $self->[1]; | |||||||||
| 12 | 26 | @{$self} = (''); | |||||||||
| 13 | 26 | return $sock; | |||||||||
| 14 | } else { | ||||||||||
| 15 | 43 | return undef; | |||||||||
| 16 | } | ||||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 41 | ▶ | sub push { | ||||||||
|
Subroutine
push: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 20 | 41 | my ($self, $host, $port, $sock) = @_; | |||||||||
| 21 | 41 | $self->[0] = "$host:$port"; | |||||||||
| 22 | 41 | $self->[1] = $sock; | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 48 | 1; | |||||||||
| 26 | |||||||||||