line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# This file is part of ElasticSearchX-Model |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# This software is Copyright (c) 2016 by Moritz Onken. |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# This is free software, licensed under: |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# The (three-clause) BSD License |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
package ElasticSearchX::Model::Document::Trait::Field::TTL; |
11
|
|
|
|
|
|
|
$ElasticSearchX::Model::Document::Trait::Field::TTL::VERSION = '1.0.2'; |
12
|
4
|
|
|
4
|
|
1853
|
use Moose::Role; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
28
|
|
13
|
4
|
|
|
4
|
|
15343
|
use ElasticSearchX::Model::Document::Types qw(:all); |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
28
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has ttl => ( |
16
|
|
|
|
|
|
|
is => 'rw', |
17
|
|
|
|
|
|
|
isa => TTLField, |
18
|
|
|
|
|
|
|
coerce => 1, |
19
|
|
|
|
|
|
|
predicate => 'has_ttl', |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
around mapping => sub { () }; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
around type_mapping => sub { |
25
|
|
|
|
|
|
|
my ( $orig, $self ) = @_; |
26
|
|
|
|
|
|
|
my $default = $self->default($self); |
27
|
|
|
|
|
|
|
return ( _ttl => $self->ttl ); |
28
|
|
|
|
|
|
|
}; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
around field_name => sub {'_ttl'}; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
around property => sub {0}; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=pod |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=encoding UTF-8 |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 NAME |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
ElasticSearchX::Model::Document::Trait::Field::TTL |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 VERSION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
version 1.0.2 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 AUTHOR |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Moritz Onken |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This software is Copyright (c) 2016 by Moritz Onken. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
This is free software, licensed under: |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
The (three-clause) BSD License |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |