line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package # hide from CPAN |
2
|
|
|
|
|
|
|
Riemann::Client::Transport; |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
1238
|
use Moo; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
17
|
|
5
|
2
|
|
|
2
|
|
973
|
use Scalar::Util 'blessed'; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
281
|
|
6
|
2
|
|
|
2
|
|
370
|
use IO::Socket::INET; |
|
2
|
|
|
|
|
17017
|
|
|
2
|
|
|
|
|
26
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has host => (is => 'ro', required => 1); |
9
|
|
|
|
|
|
|
has port => (is => 'ro', required => 1); |
10
|
|
|
|
|
|
|
has socket => (is => 'lazy', clearer => 1); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub send { |
13
|
0
|
|
|
0
|
0
|
|
die 'Not implemented'; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub _build_socket { |
17
|
0
|
|
|
0
|
|
|
my $self = shift; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
my @elems = split /::/, blessed $self; |
20
|
0
|
|
|
|
|
|
my $proto = $elems[-1]; |
21
|
|
|
|
|
|
|
|
22
|
0
|
0
|
|
|
|
|
my $sock = IO::Socket::INET->new( |
23
|
|
|
|
|
|
|
PeerAddr => $self->host, |
24
|
|
|
|
|
|
|
PeerPort => $self->port, |
25
|
|
|
|
|
|
|
Proto => $proto, |
26
|
|
|
|
|
|
|
) or die $!; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
return $sock; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |