Model/Document/Trait/Field/TTL.pm

filter: Statementstmt 68.4% 13 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 2 / 6 Podpod n/a totaltotal 60.0% 15 / 25 SCAR 0.3
CC
1
Cov
68%
__ANON__
2.0
__ANON__
1.1
__ANON__
1.1
CRAP 1.0
« Model/Document/Trait/Field/ID.pm ↑ Summary Model/Document/Trait/Field/Timestamp.pm »
1 #
2 # This file is part of ElasticSearchX-Model
3 #
4 # This software is Copyright (c) 2018 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 5 $ElasticSearchX::Model::Document::Trait::Field::TTL::VERSION = '2.0.0';
12 5 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 5 ▶use ElasticSearchX::Model::Document::Types qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 5 has ttl => (
16 is => 'rw',
17 isa => TTLField,
18 coerce => 1,
19 predicate => 'has_ttl',
20 );
21  
22 0 ▶around mapping => sub { () };
Subroutine __ANON__: not called CC=1 SCAR=1.2
23  
24 around type_mapping => sub {
25 0 ▶ my ( $orig, $self ) = @_;
Subroutine __ANON__: not called CC=1 SCAR=6.9
26 0 my $default = $self->default($self);
27 0 return ( _ttl => $self->ttl );
28 5 };
29  
30 0 ▶around field_name => sub {'_ttl'};
Subroutine __ANON__: not called CC=1 SCAR=1.2
31  
32 0 ▶around property => sub {0};
Subroutine __ANON__: not called CC=1 SCAR=1.2
33  
34 5 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 2.0.0
49  
50 =head1 AUTHOR
51  
52 Moritz Onken
53  
54 =head1 COPYRIGHT AND LICENSE
55  
56 This software is Copyright (c) 2018 by Moritz Onken.
57  
58 This is free software, licensed under:
59  
60 The (three-clause) BSD License
61  
62 =cut
« Model/Document/Trait/Field/ID.pm ↑ Summary Model/Document/Trait/Field/Timestamp.pm »