Elasticsearch/Role/Client.pm

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