File Coverage

blib/lib/OpenSearch/Client/Role/Client.pm
Criterion Covered Total %
statement 6 9 66.6
branch n/a
condition n/a
subroutine 2 3 66.6
pod 1 1 100.0
total 9 13 69.2


line stmt bran cond sub pod time code
1             # OpenSearch::Client is an unofficial client for OpenSearch.
2             # It is derived from Search::Elasticsearch version 7.714
3             # License details from the original work are contained in the
4             # NOTICE file distributed with this work.
5             #
6             #-----------------------------------------------------------------------
7             # OpenSearch::Client
8             #-----------------------------------------------------------------------
9             # Copyright 2026 Mark Dootson
10             #
11             # Licensed under the Apache License, Version 2.0 (the "License");
12             # you may not use this file except in compliance with the License.
13             # You may obtain a copy of the License at
14             #
15             # http://www.apache.org/licenses/LICENSE-2.0
16             #
17             # Unless required by applicable law or agreed to in writing, software
18             # distributed under the License is distributed on an "AS IS" BASIS,
19             # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20             # See the License for the specific language governing permissions and
21             # limitations under the License.
22              
23             package OpenSearch::Client::Role::Client;
24             $OpenSearch::Client::Role::Client::VERSION = '3.007002';
25 55     55   24662 use Moo::Role;
  55         115  
  55         327  
26 55     55   21838 use namespace::clean;
  55         104  
  55         313  
27              
28             requires 'parse_request';
29              
30             has 'transport' => ( is => 'ro', required => 1 );
31             has 'logger' => ( is => 'ro', required => 1 );
32              
33             #===================================
34             sub perform_request {
35             #===================================
36 0     0 1   my $self = shift;
37 0           my $request = $self->parse_request(@_);
38 0           return $self->transport->perform_request($request);
39             }
40              
41             1;
42              
43             __END__