Catmandu/CQLSearchable.pm

filter: Statementstmt 62.0% 18 / 29 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod n/a totaltotal 52.5% 21 / 40 CC 4 SCAR 18.5
CC
4
Cov
51%
__ANON__
12.0
__ANON__
6.0
BEGIN
1.0
CRAP 6.4
« Catmandu/Cmd/run.pm ↑ Summary Catmandu/Validator.pm »
1 package Catmandu::CQLSearchable;
2  
3 1 ▶use Catmandu::Sane;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 our $VERSION = '1.2025';
6  
7 1 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 with 'Catmandu::Searchable';
11  
12 1 requires 'translate_sru_sortkeys';
13 1 requires 'translate_cql_query';
14  
15 0 ▶my $AROUND_SEARCH = sub {
Subroutine __ANON__: not called CC=3 SCAR=24.8
16 0 my ($orig, $self, %args) = @_;
17  
18 0 ▶ if (my $sru_sortkeys = delete $args{sru_sortkeys}) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $sru_sortkeys = delete $args{"sru_sortkeys"}) 0 0 0
19 0 $args{sort} = $self->translate_sru_sortkeys($sru_sortkeys);
20 }
21 0 ▶ if (my $cql_query = delete $args{cql_query}) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $cql_query = delete $args{"cql_query"}) 0 0 0
22 0 $args{query} = $self->translate_cql_query($cql_query);
23 }
24  
25 0 $orig->($self, %args);
26 1 };
27  
28 1 around search => $AROUND_SEARCH;
29 1 around searcher => $AROUND_SEARCH;
30  
31 0 ▶around delete_by_query => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
32 0 my ($orig, $self, %args) = @_;
33  
34 0 ▶ if (my $cql = delete $args{cql_query}) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $cql = delete $args{"cql_query"}) 0 0 0
35 0 $args{query} = $self->translate_cql_query($cql);
36 }
37  
38 0 $orig->($self, %args);
39 0 return;
40 1 };
41  
42 1 1;
43  
44 __END__
« Catmandu/Cmd/run.pm ↑ Summary Catmandu/Validator.pm »