Elasticsearch/Client/7_0/Role/Scroll.pm untested

filter: Statementstmt 0.0% 0 / 38 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 52 CC 3 SCAR 13.9
CC
3
Cov
0%
scroll_request
6.0
DEMOLISH
6.0
BEGIN
2.0
CRAP 4.0
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::Client::7_0::Role::Scroll;
6 $Search::Elasticsearch::Client::7_0::Role::Scroll::VERSION = '7.30_1'; # TRIAL
7  
8 $Search::Elasticsearch::Client::7_0::Role::Scroll::VERSION = '7.301';
9 use Moo::Role;
10 requires 'finish';
11 use Search::Elasticsearch::Util qw(parse_params throw);
12 use Devel::GlobalDestruction;
13 use namespace::clean;
14 has 'es' => ( is => 'ro', required => 1 );
15 has 'scroll' => ( is => 'ro' );
16 has 'total' => ( is => 'rwp' );
17 has 'max_score' => ( is => 'rwp' );
18 has 'facets' => ( is => 'rwp' );
19 has 'aggregations' => ( is => 'rwp' );
20 has 'suggest' => ( is => 'rwp' );
21 has 'took' => ( is => 'rwp' );
22 has 'total_took' => ( is => 'rwp' );
23 has 'search_params' => ( is => 'ro' );
24 has 'is_finished' => ( is => 'rwp', default => '' );
25 has '_pid' => ( is => 'ro', default => sub {$$} );
26 has '_scroll_id' => ( is => 'rwp', clearer => 1, predicate => 1 );
27  
28 #===================================
29 sub scroll_request {
30 #===================================
31 my $self = shift;
32 throw( 'Illegal',
33 'Scroll requests are not fork safe and may only be '
34 . 'refilled by the same process that created the instance.' )
35 if $self->_pid != $$;
36  
37 my %args = ( scroll => $self->scroll );
38 $args{body} = { scroll_id => $self->_scroll_id };
39 $self->es->scroll(%args);
40 }
41  
42 #===================================
43 sub DEMOLISH {
44 #===================================
45 my $self = shift or return;
46 return if in_global_destruction;
47 $self->finish;
48 }
49  
50 1;
51  
52 # ABSTRACT: Provides common functionality to L<Search::Elasticsearch::Client::7_0::Scroll> and L<Search::Elasticsearch::Client::7_0::Async::Scroll>
53  
54 __END__