blib/lib/URI/udp.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 17 / 17 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/URI/tcp.pm ↑ Summary
1 package URI::udp;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use parent qw(URI::_server);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 =head1 NAME
8  
9 URI::udp - udp connection string
10  
11 =head1 SYNOPSIS
12  
13 $uri = URI->new('udp://host:1234');
14  
15 $sock = IO::Socket::INET->new(
16 PeerAddr => $uri->host,
17 PeerPort => $uri->port',
18 Proto => $uri->protocol,
19 );
20  
21 =head1 DESCRIPTION
22  
23 URI extension for UDP protocol
24  
25 =head1 EXTENDED METHODS
26  
27 =head2 protocol()
28  
29 return I<udp>
30  
31 same as C<scheme> method
32  
33 =cut
34  
35 sub protocol {
36 1 ▶ my ($self) = @_;
Subroutine protocol: called CC=1 SCAR=0.0
Pod documented
37  
38 1 return $self->scheme;
39 }
40  
41 =head1 contributing
42  
43 for dependency use L<cpanfile>...
44  
45 for resolve dependency use L<Carton> (or carton - is more experimental)
46  
47 carton install
48  
49 for run test use C<minil test>
50  
51 carton exec minil test
52  
53  
54 if you don't have perl environment, is best way use docker
55  
56 docker run -it -v $PWD:/tmp/work -w /tmp/work avastsoftware/perl-extended carton install
57 docker run -it -v $PWD:/tmp/work -w /tmp/work avastsoftware/perl-extended carton exec minil test
58  
59 =head2 warning
60  
61 docker run default as root, all files which will be make in docker will be have root rights
62  
63 one solution is change rights in docker
64  
65 docker run -it -v $PWD:/tmp/work -w /tmp/work avastsoftware/perl-extended bash -c "carton install; chmod -R 0777 ."
66  
67 or after docker command (but you must have root rights)
68  
69 =head1 LICENSE
70  
71 Copyright (C) Avast Software.
72  
73 This library is free software; you can redistribute it and/or modify
74 it under the same terms as Perl itself.
75  
76 =head1 AUTHOR
77  
78 Jan Seidl E<lt>seidl@avast.comE<gt>
79  
80 =cut
81  
82 1 1
« blib/lib/URI/tcp.pm ↑ Summary