ODS/Table/Column/Integer.pm

filter: Statementstmt 66.6% 10 / 15 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 3 totaltotal 43.3% 13 / 30 CC 3 SCAR 17.7
CC
3
Cov
50%
validation
12.0
deflation
2.0
BEGIN
1.0
CRAP 5.9
« ODS/Storage/Base.pm ↑ Summary ODS/Table/Column/Float.pm »
1 package ODS::Table::Column::Integer;
2  
3 2 ▶use YAOO;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 extends 'ODS::Table::Column::Base';
6  
7 2 ▶use ODS::Utils qw/error/;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 has auto_increment => rw, isa(boolean);
10  
11 sub validation {
12 0 ▶ if (ref($_[1]) || ${$_[1]} !~ m/\d+/) {
Subroutine validation: not called CC=3 SCAR=24.8
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
if (ref $_[1] or not ${$_[1];} =~ /\d+/) 0 0 0
Condition0%0/3
ref $_[1] or not ${$_[1];} =~ /\d+/
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[1] or not ${$_[1];} =~ /\d+/
ref $_[1] not ${$_[1];} =~ /\d+/
Truth table0%0/3
A or not(B)
A= ref $_[1]B= not ${$_[1];} =~ /\d+/
ABresult
1X1
011
000
13 0 croak sprintf "The value passed to the %s column does not match the integer constraint.",
14 $_[0]->name;
15 }
16 0 return $_[1];
17 }
18  
19 1 ▶sub inflation { return 0 + $_[1]; }
Subroutine inflation: called CC=1 SCAR=0.0
Pod undocumented
20  
21 0 ▶sub deflation { return 0 + $_[1]; }
Subroutine deflation: not called CC=1 SCAR=6.9
Pod undocumented
22  
23 #sub coercion { return $_[1]; }
24  
25 2 1;
26  
27 __END__
« ODS/Storage/Base.pm ↑ Summary ODS/Table/Column/Float.pm »