Object/Metadata/Column/Integer.pm

filter: Statementstmt 81.8% 18 / 22 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 9 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 66.6% 4 / 6 Podpod 66.6% 2 / 3 totaltotal 52.1% 24 / 46 CC 5 SCAR 22.8
CC
5
Cov
55%
should_inline_value
18.4
perl_column_definition_attributes
2.0
BEGIN
1.0
CRAP 9.8
« Object/Metadata/Column/Time.pm ↑ Summary Object/Metadata/Column/TimestampWithTimeZone.pm »
1 package Rose::DB::Object::Metadata::Column::Integer;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use Rose::DB::Object::Metadata::Column::Scalar;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 our @ISA = qw(Rose::DB::Object::Metadata::Column::Scalar);
7  
8 1 our $VERSION = '0.788';
9  
10 1 __PACKAGE__->add_common_method_maker_argument_names(qw(min max));
11 1 __PACKAGE__->delete_common_method_maker_argument_names(qw(length));
12  
13 1 Rose::Object::MakeMethods::Generic->make_methods
14 (
15 { preserve_existing => 1 },
16 scalar => [ __PACKAGE__->common_method_maker_argument_names ]
17 );
18  
19 1 foreach my $type (__PACKAGE__->available_method_types)
20 {
21 3 __PACKAGE__->method_maker_type($type => 'integer');
22 }
23  
24 9 ▶sub type { 'integer' }
Subroutine type: called CC=1 SCAR=0.0
Pod documented
25  
26 sub should_inline_value
27 0 ▶{
Subroutine should_inline_value: not called CC=5 SCAR=29.1
Pod documented
28 0 my($self, $db, $value) = @_;
29 1 ▶ no warnings 'uninitialized';
Subroutine BEGIN: called CC=1 SCAR=0.0
30 0 ▶ return (($db->validate_integer_keyword($value) && $db->should_inline_integer_keyword($value)) ||
Branch: 1 branch
BranchTrueFalseTotal
$db->validate_integer_keyword($value) && $db->should_inline_integer_keyword($value) || $db->keyword_function_calls && $value =~ /^\w+\(.*\)$/ ? : 0 0 0
Condition0%0/9
$db->validate_integer_keyword($value) and $db->should_inline_integer_keyword($value) or $db->keyword_function_calls and $value =~ /^\w+\(.*\)$/
l!l&&r!l&&!r
000
$db->validate_integer_keyword($value) and $db->should_inline_integer_keyword($value)
!ll&&!rl&&r
000
$db->keyword_function_calls and $value =~ /^\w+\(.*\)$/
!ll&&!rl&&r
000
MC/DC0%0/4
$db->validate_integer_keyword($value) and $db->should_inline_integer_keyword($value) or $db->keyword_function_calls and $value =~ /^\w+\(.*\)$/
$db->validate_integer_keyword($value) $db->should_inline_integer_keyword($value) $db->keyword_function_calls $value =~ /^\w+\(.*\)$/
Truth table0%0/7
A and B or C and D
A= $db->validate_integer_keyword($value)B= $db->should_inline_integer_keyword($value)C= $db->keyword_function_callsD= $value =~ /^\w+\(.*\)$/
ABCDresult
11XX1
0X111
10111
0X0X0
0X100
100X0
10100
31 ($db->keyword_function_calls && $value =~ /^\w+\(.*\)$/)) ? 1 : 0;
32 }
33  
34 sub perl_column_definition_attributes
35 0 ▶{
Subroutine perl_column_definition_attributes: not called CC=1 SCAR=6.9
Pod undocumented
36 0 grep { $_ ne 'length' } shift->SUPER::perl_column_definition_attributes;
37 }
38  
39 1 1;
40  
41 __END__
« Object/Metadata/Column/Time.pm ↑ Summary Object/Metadata/Column/TimestampWithTimeZone.pm »