Client/Core/3_0/Direct/SnapshotManagement.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 39 CC 5 SCAR 30.9
CC
5
Cov
0%
method_supported_in_version
30.0
BEGIN
2.0
BEGIN
2.0
CRAP 22.0
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::Core::3_0::Direct::SnapshotManagement;
24 $OpenSearch::Client::Core::3_0::Direct::SnapshotManagement::VERSION = '3.007011';
25 use Moo;
26 with 'OpenSearch::Client::Core::3_0::Role::API';
27 with 'OpenSearch::Client::Role::Client::Direct';
28 use namespace::clean;
29  
30 our %_api_method_supported_version_stash;
31  
32 sub method_supported_in_version {
33 my( $self, @args ) = @_;
34 my %params = ( ref($args[0]) ) ? %{ $args[0] } : @args;
35 my $version = $params{version};
36 my $method = $params{method};
37 return 0 unless($method && $version);
38 return 0 unless(exists($_api_method_supported_version_stash{$method}));
39 my $supported_version = $_api_method_supported_version_stash{$method};
40 my $checkversion = version->declare('v' . $version)->numify;
41 return ( $checkversion < $supported_version ) ? 0 : 1;
42 }
43  
44 __PACKAGE__->_install_api('sm');
45  
46 1;
47  
48 __END__