File Coverage

blib/lib/OpenSearch.pm
Criterion Covered Total %
statement 42 71 59.1
branch n/a
condition 0 12 0.0
subroutine 14 21 66.6
pod 6 7 85.7
total 62 111 55.8


line stmt bran cond sub pod time code
1             package OpenSearch;
2 4     4   1385352 use strict;
  4         317  
  4         178  
3 4     4   21 use warnings;
  4         8  
  4         592  
4 4     4   3419 use Moo;
  4         53766  
  4         20  
5 4     4   17943 use Types::Standard qw(InstanceOf);
  4         735958  
  4         57  
6 4     4   15409 use feature qw(signatures);
  4         10  
  4         743  
7 4     4   32 no warnings qw(experimental::signatures);
  4         10  
  4         235  
8 4     4   1982 use Data::Dumper;
  4         21479  
  4         387  
9 4     4   2761 use OpenSearch::Base;
  4         78  
  4         233  
10              
11 4     4   2408 use OpenSearch::Cluster;
  4         21  
  4         180  
12 4     4   2492 use OpenSearch::Remote;
  4         25  
  4         313  
13 4     4   2161 use OpenSearch::Search;
  4         26  
  4         208  
14 4     4   3204 use OpenSearch::Index;
  4         20  
  4         194  
15 4     4   2683 use OpenSearch::Document;
  4         24  
  4         215  
16 4     4   2775 use OpenSearch::Security;
  4         22  
  4         2205  
17              
18             our $VERSION = '0.94';
19              
20             has '_base' => (
21             is => 'rw',
22             isa => InstanceOf ['OpenSearch::Base'],
23             init_arg => undef,
24             );
25              
26 0     0 0   sub BUILD( $self, $args ) {
  0            
  0            
  0            
27             $self->_base( OpenSearch::Base->new(
28             user => $args->{user},
29             pass => $args->{pass},
30             hosts => $args->{hosts},
31             secure => $args->{secure} // 0,
32             allow_insecure => $args->{allow_insecure} // 1,
33             pool_count => $args->{pool_count} // 10,
34             clear_attrs => $args->{clear_attrs} // 0,
35             async => $args->{async} // 0,
36 0   0       max_connections => $args->{max_connections} // 10,
      0        
      0        
      0        
      0        
      0        
37             ) );
38             }
39              
40 0     0 1   sub cluster($self) {
  0            
  0            
41 0           return ( OpenSearch::Cluster->new( _base => $self->_base ) );
42             }
43              
44 0     0 1   sub remote($self) {
  0            
  0            
45 0           return ( OpenSearch::Remote->new( _base => $self->_base ) );
46             }
47              
48 0     0 1   sub search($self) {
  0            
  0            
49 0           return ( OpenSearch::Search->new( _base => $self->_base ) );
50             }
51              
52 0     0 1   sub index($self) {
  0            
  0            
53 0           return ( OpenSearch::Index->new( _base => $self->_base ) );
54             }
55              
56 0     0 1   sub document($self) {
  0            
  0            
57 0           return ( OpenSearch::Document->new( _base => $self->_base ) );
58             }
59              
60 0     0 1   sub security($self) {
  0            
  0            
61 0           return ( OpenSearch::Security->new( _base => $self->_base ) );
62             }
63              
64             1;
65              
66             __END__