File Coverage

blib/lib/Message/Passing/Role/HasUsernameAndPassword.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Message::Passing::Role::HasUsernameAndPassword;
2 1     1   1213 use Moo::Role;
  1         1  
  1         7  
3 1     1   331 use MooX::Types::MooseLike::Base qw/ Str /;
  1         2  
  1         54  
4 1     1   5 use namespace::clean -except => 'meta';
  1         2  
  1         7  
5              
6             foreach my $name (qw/ username password /) {
7             has $name => (
8             is => 'ro',
9             isa => Str,
10             required => 1,
11             );
12             }
13              
14             1;
15              
16             =head1 NAME
17              
18             Message::Passing::Role::HasUsernameAndPassword - common username and password attributes
19              
20             =head1 SYNOPSIS
21              
22             package Message::Passing::Output::MyOutput;
23             use Moo;
24             use namespace::clean -except => 'meta';
25              
26             with 'Message::Passing::Role::HasUsernameAndPassword';
27              
28             =head1 METHODS
29              
30             =head2 username
31              
32             The username for a connection. Required, Str.
33              
34             =head2 password
35              
36             The password for a connection. Required, Str.
37              
38             =head1 AUTHOR, COPYRIGHT AND LICENSE
39              
40             See L.
41              
42             =cut