ODS/Table/Column/Integer.pm

filter: Statementstmt 92.8% 13 / 14 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 3 totaltotal 68.9% 20 / 29 CC 3 SCAR 8.5
CC
3
Cov
79%
validation
4.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.3
« ODS/Table/Column/Base.pm ↑ Summary ODS/Angel.pm »
1 package ODS::Table::Column::Integer;
2  
3 72 ▶use YAOO;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 72 extends 'ODS::Table::Column::Base';
6  
7 72 ▶use ODS::Utils qw/error/;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 72 has auto_increment => rw, isa(boolean);
10  
11 sub validation {
12 3422 ▶ if (ref($_[1]) || $_[1] !~ m/\d+/) {
Subroutine validation: called CC=3 SCAR=14.2
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
if (ref $_[1] or not $_[1] =~ /\d+/) 0 3422 3422
Condition33%1/3
ref $_[1] or not $_[1] =~ /\d+/
l!l&&r!l&&!r
003422
MC/DC0%0/2
ref $_[1] or not $_[1] =~ /\d+/
ref $_[1] not $_[1] =~ /\d+/
Truth table33%1/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 3422 return $_[1];
17 }
18  
19 913 ▶sub inflation { return 0 + $_[1]; }
Subroutine inflation: called CC=1 SCAR=0.0
Pod undocumented
20  
21 1711 ▶sub deflation { return 0 + $_[1]; }
Subroutine deflation: called CC=1 SCAR=0.0
Pod undocumented
22  
23 #sub coercion { return $_[1]; }
24  
25 72 1;
26  
27 __END__
« ODS/Table/Column/Base.pm ↑ Summary ODS/Angel.pm »