File Coverage

blib/lib/OpenSearch/Parameters/Security/GetRole.pm
Criterion Covered Total %
statement 15 16 93.7
branch n/a
condition n/a
subroutine 5 6 83.3
pod 0 1 0.0
total 20 23 86.9


line stmt bran cond sub pod time code
1             package OpenSearch::Parameters::Security::GetRole;
2 4     4   2490 use strict;
  4         12  
  4         198  
3 4     4   26 use warnings;
  4         10  
  4         269  
4 4     4   26 use feature qw(state);
  4         8  
  4         479  
5 4     4   26 use Types::Standard qw(Str);
  4         8  
  4         32  
6 4     4   9297 use Moo::Role;
  4         11  
  4         40  
7              
8             with 'OpenSearch::Parameters';
9              
10             has 'role' => (
11             is => 'rw',
12             isa => Str,
13             required => 1
14             );
15              
16             around [qw/role/] => sub {
17             my $orig = shift;
18             my $self = shift;
19              
20             if (@_) {
21             $self->$orig(@_);
22             return ($self);
23             }
24             return ( $self->$orig );
25             };
26              
27             sub api_spec {
28 0     0 0   state $s = +{
29             role => {
30             encode_func => 'as_is',
31             type => 'path',
32             },
33             };
34             }
35              
36             1;