File Coverage

blib/lib/POEx/IRC/Backend/Role/HasEndpoint.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package POEx::IRC::Backend::Role::HasEndpoint;
2             $POEx::IRC::Backend::Role::HasEndpoint::VERSION = '0.030001';
3 4     4   2159 use Moo::Role;
  4         6  
  4         25  
4              
5             has addr => (
6             required => 1,
7             is => 'ro',
8             );
9              
10             has port => (
11             required => 1,
12             is => 'ro',
13             writer => 'set_port',
14             );
15              
16             1;
17              
18             =pod
19              
20             =for Pod::Coverage has_\w+
21              
22             =head1 NAME
23              
24             POEx::IRC::Backend::Role::HasEndpoint
25              
26             =head1 DESCRIPTION
27              
28             This role is consumed by L and
29             L objects; it defines some basic attributes
30             shared by listening/connecting sockets.
31              
32             =head2 addr
33              
34             The connecting/listening socket endpoint address.
35              
36             =head2 port
37              
38             The connecting/listening socket endpoint port.
39              
40             =head2 set_port
41              
42             Change the current port attribute.
43              
44             This won't trigger any automatic Wheel changes (at this time),
45             but it is useful when creating a Listener on port 0 and updating your
46             Listener's state accordingly.
47              
48             =head1 AUTHOR
49              
50             Jon Portnoy
51              
52             =cut