| 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
| |||||||||||
| 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__ | ||||||||||