line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package URI::tcp; |
2
|
2
|
|
|
2
|
|
851
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
57
|
|
3
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
65
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.1.2'; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
427
|
use parent qw(URI::_server); |
|
2
|
|
|
|
|
428
|
|
|
2
|
|
|
|
|
10
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
URI::tcp - tcp connection string |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
$uri = URI->new('tcp://host:1234'); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
$sock = IO::Socket::INET->new( |
18
|
|
|
|
|
|
|
PeerAddr => $uri->host, |
19
|
|
|
|
|
|
|
PeerPort => $uri->port', |
20
|
|
|
|
|
|
|
Proto => $uri->protocol, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
URI extension for TCP protocol |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 EXTENDED METHODS |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 protocol() |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
return I |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
same as C method |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub protocol { |
38
|
1
|
|
|
1
|
1
|
1250
|
my ($self) = @_; |
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
|
|
7
|
return $self->scheme; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 contributing |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
for dependency use L... |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
for resolve dependency use L (or carton - is more experimental) |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
carton install |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
for run test use C |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
carton exec minil test |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
if you don't have perl environment, is best way use docker |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
docker run -it -v $PWD:/tmp/work -w /tmp/work avastsoftware/perl-extended carton install |
59
|
|
|
|
|
|
|
docker run -it -v $PWD:/tmp/work -w /tmp/work avastsoftware/perl-extended carton exec minil test |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 warning |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
docker run default as root, all files which will be make in docker will be have root rights |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
one solution is change rights in docker |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
docker run -it -v $PWD:/tmp/work -w /tmp/work avastsoftware/perl-extended bash -c "carton install; chmod -R 0777 ." |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
or after docker command (but you must have root rights) |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 LICENSE |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Copyright (C) Avast Software. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
76
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 AUTHOR |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Jan Seidl Eseidl@avast.comE |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
1; |