Etcd/User/Role.pm

filter: Statementstmt 75.7% 25 / 33 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod 100% 2 / 2 totaltotal 76.7% 33 / 43 CC 1 SCAR 2.2
CC
1
Cov
76%
grant
2.0
revoke
2.0
BEGIN
1.0
CRAP 1.2
« Etcd/KV/Put.pm ↑ Summary
1 9 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package Net::Etcd::User::Role;
3  
4 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 9 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 9 ▶use Types::Standard qw(Str Int Bool HashRef ArrayRef);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 9 with 'Net::Etcd::Role::Actions';
11  
12 9 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 =head1 NAME
15  
16 Net::Etcd::User::Role
17  
18 =cut
19  
20 9 our $VERSION = '0.022';
21  
22 =head1 DESCRIPTION
23  
24 Use role
25  
26 =cut
27  
28 =head1 ACCESSORS
29  
30 =head2 endpoint
31  
32 =cut
33  
34 9 has endpoint => (
35 is => 'ro',
36 isa => Str,
37 );
38  
39 =head2 user
40  
41 name of user
42  
43 =cut
44  
45 9 has user => (
46 is => 'ro',
47 isa => Str,
48 );
49  
50 =head2 name
51  
52 name of user
53  
54 =cut
55  
56 9 has name => (
57 is => 'ro',
58 isa => Str,
59 );
60  
61 =head2 role
62  
63 name of role
64  
65 =cut
66  
67 9 has role => (
68 is => 'ro',
69 isa => Str,
70 );
71  
72 =head1 PUBLIC METHODS
73  
74 =head2 grant
75  
76 =cut
77  
78 0 ▶sub grant {
Subroutine grant: not called CC=1 SCAR=6.9
Pod documented
79 0 my $self = shift;
80 0 $self->{endpoint} = '/auth/user/grant';
81 0 $self->request;
82 0 return $self;
83 }
84  
85 =head2 revoke
86  
87 =cut
88  
89 0 ▶sub revoke {
Subroutine revoke: not called CC=1 SCAR=6.9
Pod documented
90 0 my $self = shift;
91 0 $self->{endpoint} = '/auth/user/revoke';
92 0 $self->request;
93 0 return $self;
94 }
95  
96 9 1;
« Etcd/KV/Put.pm ↑ Summary