blib/lib/Oryx/Value/Integer.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 32 CC 2 SCAR 11.0
CC
2
Cov
0%
check_size
6.0
primitive
2.0
check_type
2.0
CRAP 3.0
1 package Oryx::Value::Integer;
2 use base qw(Oryx::Value);
3  
4 use Data::Types qw(is_int to_int);
5  
6 sub primitive { 'Integer' }
7  
8 sub check_type {
9 my ($self, $value) = @_;
10 return is_int($value);
11 }
12  
13 sub check_size {
14 my ($self, $value) = @_;
15 if (defined $self->meta->size) {
16 return $value <= $self->meta->size;
17 }
18 return 1;
19 }
20  
21 sub inflate {
22 my ($self, $value) = @_;
23 return to_int($value);
24 }
25  
26 sub deflate {
27 my ($self, $value) = @_;
28 return to_int($value);
29 }
30  
31 1;
32 __END__