blib/lib/URI/tcp.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 18 / 18 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Build ↑ Summary blib/lib/URI/udp.pm »
1 package URI::tcp;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 our $VERSION = '0.1.3';
6  
7 2 ▶use parent qw(URI::_server);
Subroutine BEGIN: called CC=1 SCAR=0.0
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<tcp>
32  
33 same as C<scheme> method
34  
35 =cut
36  
37 sub protocol {
38 1 ▶ my ($self) = @_;
Subroutine protocol: called CC=1 SCAR=0.0
Pod documented
39  
40 1 return $self->scheme;
41 }
42  
43 =head1 history
44  
45 Module C<URI::tcp> was indexed by L<SOAP::Lite>, but isn't possible to use it. This L<pull request|https://github.com/redhotpenguin/soaplite/pull/31> change it.
46  
47 =head1 contributing
48  
49 for dependency use L<cpanfile>...
50  
51 for resolve dependency use L<Carton> (or carton - is more experimental)
52  
53 carton install
54  
55 for run test use C<minil test>
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 E<lt>seidl@avast.comE<gt>
85  
86 =cut
87  
88 2 1;
« Build ↑ Summary blib/lib/URI/udp.pm »