| 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
Condition0%0/3
ref $_[1] or not ${$_[1];} =~ /\d+/
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+/
| |||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||