lib/Types/ElasticSearch.pm

filter: Statementstmt 88.2% 15 / 17 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod n/a totaltotal 76.0% 19 / 25 CC 2 SCAR 9.4
CC
2
Cov
79%
__ANON__
6.0
__ANON__
2.0
BEGIN
1.0
CRAP 2.6
« script/es-copy-index.pl ↑ Summary lib/App/ElasticSearch/Utilities/QueryString/IP.pm »
1 package Types::ElasticSearch;
2 # ABSTRACT: Types for working with ElasticSearch
3  
4 6 ▶use v5.16;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 6 our $VERSION = '9.1'; # VERSION
8  
9 6 ▶use Type::Library -base;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 6 ▶use Type::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 my $TimeConstant = Type::Tiny->new(
13 name => "TimeConstant",
14 0 ▶ constraint => sub { defined($_) && /^\d+(y|M|w|d|h|m|s|ms)$/ },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
defined $_ and /^\d+(y|M|w|d|h|m|s|ms)$/u 0 0 0
15 0 ▶ message => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
16 0 "must be time constant: https://www.elastic.co/guide/en/elasticsearch/reference/master/common-options.html#time-units"
17 },
18 6 );
19  
20 6 __PACKAGE__->meta->add_type($TimeConstant);
21 6 __PACKAGE__->meta->make_immutable;
22  
23 __END__
« script/es-copy-index.pl ↑ Summary lib/App/ElasticSearch/Utilities/QueryString/IP.pm »