line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package URI::tcp; |
2
|
2
|
|
|
2
|
|
1458
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
75
|
|
3
|
2
|
|
|
2
|
|
16
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
134
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.1.3'; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
614
|
use parent qw(URI::_server); |
|
2
|
|
|
|
|
727
|
|
|
2
|
|
|
|
|
13
|
|
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
|
1855
|
my ($self) = @_; |
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
|
|
13
|
return $self->scheme; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 history |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Module C was indexed by L, but isn't possible to use it. This L change it. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 contributing |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
for dependency use L... |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
for resolve dependency use L (or carton - is more experimental) |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
carton install |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
for run test use C |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
carton exec minil test |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
if you don't have perl environment, is best way use docker |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
docker run -it -v $PWD:/tmp/work -w /tmp/work avastsoftware/perl-extended carton install |
63
|
|
|
|
|
|
|
docker run -it -v $PWD:/tmp/work -w /tmp/work avastsoftware/perl-extended carton exec minil test |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 warning |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
docker run default as root, all files which will be make in docker will be have root rights |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
one solution is change rights in docker |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
docker run -it -v $PWD:/tmp/work -w /tmp/work avastsoftware/perl-extended bash -c "carton install; chmod -R 0777 ." |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
or after docker command (but you must have root rights) |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 LICENSE |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Copyright (C) Avast Software. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
80
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 AUTHOR |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Jan Seidl Eseidl@avast.comE |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=cut |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
1; |