Model/TypeMap/Common.pm

filter: Statementstmt 83.3% 15 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod n/a totaltotal 76.0% 19 / 25 CC 1 SCAR 2.7
CC
1
Cov
83%
__ANON__
2.0
__ANON__
2.0
__ANON__
1.1
CRAP 1.3
« Model/Deleted.pm ↑ Summary Model/Trait/Exclude.pm »
1 package Elastic::Model::TypeMap::Common;
2 23 $Elastic::Model::TypeMap::Common::VERSION = '0.52';
3 23 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 23 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 23 ▶use Elastic::Model::TypeMap::Base qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 23 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 #===================================
10 has_type 'DateTime',
11 #===================================
12 0 ▶ deflate_via {'$val->set_time_zone("UTC")->iso8601'}, inflate_via {
Subroutine __ANON__: not called CC=1 SCAR=6.9
Subroutine __ANON__: not called CC=1 SCAR=6.9
13 0 'do { my %args;'
14 . '@args{ (qw(year month day hour minute second)) } = split /\D/, $val;'
15 . 'DateTime->new(%args);' . '}';
16 },
17  
18 0 ▶ map_via { type => 'date' };
Subroutine __ANON__: not called CC=1 SCAR=1.2
19 23 1;
20  
21 # ABSTRACT: Type maps for commonly used types
22  
23 __END__
« Model/Deleted.pm ↑ Summary Model/Trait/Exclude.pm »