File Coverage

blib/lib/OpenSearch/Parameters/Security/ChangePassword.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::ChangePassword;
2 4     4   3621 use strict;
  4         10  
  4         193  
3 4     4   24 use warnings;
  4         23  
  4         250  
4 4     4   28 use feature qw(state);
  4         7  
  4         495  
5 4     4   31 use Types::Standard qw(Str);
  4         9  
  4         38  
6 4     4   7261 use Moo::Role;
  4         11  
  4         44  
7              
8             with 'OpenSearch::Parameters';
9              
10             has 'current_password' => (
11             is => 'rw',
12             isa => Str,
13             );
14              
15             has 'password' => (
16             is => 'rw',
17             isa => Str,
18             );
19              
20             around [qw/current_password password/] => sub {
21             my $orig = shift;
22             my $self = shift;
23              
24             if (@_) {
25             $self->$orig(@_);
26             return ($self);
27             }
28             return ( $self->$orig );
29             };
30              
31             sub api_spec {
32 0     0 0   state $s = +{
33             current_password => {
34             encode_func => 'as_is',
35             type => 'body',
36             },
37             password => {
38             encode_func => 'as_is',
39             type => 'body',
40             },
41             };
42             }
43              
44             1;