Elasticsearch/Role/Client.pm

filter: Statementstmt 80.0% 12 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 100% 1 / 1 totaltotal 78.9% 15 / 19 CC 1 SCAR 2.9
CC
1
Cov
80%
perform_request
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Elasticsearch/Logger/LogAny.pm ↑ Summary Elasticsearch/Cxn/Factory.pm »
1 # Licensed to Elasticsearch B.V under one or more agreements.
2 # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3 # See the LICENSE file in the project root for more information
4  
5 package Search::Elasticsearch::Role::Client;
6 55 $Search::Elasticsearch::Role::Client::VERSION = '7.30_1'; # TRIAL
7  
8 55 $Search::Elasticsearch::Role::Client::VERSION = '7.301';
9 55 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 55 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 55 requires 'parse_request';
13  
14 55 has 'transport' => ( is => 'ro', required => 1 );
15 55 has 'logger' => ( is => 'ro', required => 1 );
16  
17 #===================================
18 sub perform_request {
19 #===================================
20 0 ▶ my $self = shift;
Subroutine perform_request: not called CC=1 SCAR=6.9
Pod documented
21 0 my $request = $self->parse_request(@_);
22 0 return $self->transport->perform_request($request);
23 }
24  
25 55 1;
26  
27 =pod
28  
29 =encoding UTF-8
30  
31 =head1 NAME
32  
33 Search::Elasticsearch::Role::Client - Provides common functionality for Client implementations
34  
35 =head1 VERSION
36  
37 version 7.30_1
38  
39 =head1 DESCRIPTION
40  
41 This role provides a common C<perform_request()> method for Client
42 implementations.
43  
44 =head1 METHODS
45  
46 =head2 C<perform_request()>
47  
48 This method takes whatever arguments it is passed and passes them directly to
49 a C<parse_request()> method (which should be provided by Client implementations).
50 The C<parse_request()> method should return a request suitable for passing
51 to L<Search::Elasticsearch::Transport/perform_request()>.
52  
53 =head1 AUTHOR
54  
55 Enrico Zimuel <enrico.zimuel@elastic.co>
56  
57 =head1 COPYRIGHT AND LICENSE
58  
59 This software is Copyright (c) 2020 by Elasticsearch BV.
60  
61 This is free software, licensed under:
62  
63 The Apache License, Version 2.0, January 2004
64  
65 =cut
66  
67 __END__
« Elasticsearch/Logger/LogAny.pm ↑ Summary Elasticsearch/Cxn/Factory.pm »