File Coverage

blib/lib/OpenSearch/Parameters/Cluster/GetRoutingAwareness.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::Cluster::GetRoutingAwareness;
2 4     4   2608 use strict;
  4         12  
  4         160  
3 4     4   22 use warnings;
  4         10  
  4         251  
4 4     4   25 use feature qw(state);
  4         13  
  4         497  
5 4     4   28 use Types::Standard qw(Str Bool Int);
  4         9  
  4         43  
6 4     4   8499 use Moo::Role;
  4         9  
  4         64  
7              
8             with 'OpenSearch::Parameters';
9              
10             has 'attribute' => (
11             is => 'rw',
12             isa => Str,
13             );
14              
15             around [qw/attribute/] => sub {
16             my $orig = shift;
17             my $self = shift;
18              
19             if (@_) {
20             $self->$orig(@_);
21             return ($self);
22             }
23             return ( $self->$orig );
24             };
25              
26             sub api_spec {
27 0     0 0   state $s = +{
28             attribute => {
29             encode_func => 'as_is',
30             type => 'path',
31             }
32             };
33             }
34              
35             1;