line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Types::ElasticSearch; |
2
|
|
|
|
|
|
|
# ABSTRACT: Types for working with ElasticSearch |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
37
|
use v5.16; |
|
2
|
|
|
|
|
7
|
|
5
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
94
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '8.7'; # VERSION |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
11
|
use Type::Library -base; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
21
|
|
10
|
2
|
|
|
2
|
|
605
|
use Type::Tiny; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
350
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $TimeConstant = Type::Tiny->new( |
13
|
|
|
|
|
|
|
name => "TimeConstant", |
14
|
|
|
|
|
|
|
constraint => sub { defined($_) && /^\d+(y|M|w|d|h|m|s|ms)$/ }, |
15
|
|
|
|
|
|
|
message => sub { |
16
|
|
|
|
|
|
|
"must be time constant: https://www.elastic.co/guide/en/elasticsearch/reference/master/common-options.html#time-units" |
17
|
|
|
|
|
|
|
}, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
__PACKAGE__->meta->add_type($TimeConstant); |
21
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__END__ |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=pod |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 NAME |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Types::ElasticSearch - Types for working with ElasticSearch |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 VERSION |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
version 8.7 |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 AUTHOR |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Brad Lhotsky <brad@divisionbyzero.net> |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
This software is Copyright (c) 2023 by Brad Lhotsky. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
This is free software, licensed under: |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
The (three-clause) BSD License |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |