Object/Metadata/Column/Boolean.pm

filter: Statementstmt 65.3% 17 / 26 Branchbran 25.0% 1 / 4 Conditioncond 13.3% 2 / 15 MC/DCmcdc 0.0% 0 / 7 Subroutinesub 55.5% 5 / 9 Podpod 66.6% 4 / 6 totaltotal 43.2% 29 / 67 CC 8 SCAR 20.8
CC
8
Cov
44%
should_inline_value
18.4
method_uses_formatted_key
6.6
parse_value
2.0
CRAP 8.0
« Object/Std/Metadata.pm ↑ Summary Object/Metadata/Column/Bitfield.pm »
1 package Rose::DB::Object::Metadata::Column::Boolean;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use Rose::DB::Object::Metadata::Column::Scalar;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 our @ISA = qw(Rose::DB::Object::Metadata::Column::Scalar);
7  
8 2 our $VERSION = '0.788';
9  
10 2 foreach my $type (__PACKAGE__->available_method_types)
11 {
12 6 __PACKAGE__->method_maker_type($type => 'boolean')
13 }
14  
15 13 ▶sub type { 'boolean' }
Subroutine type: called CC=1 SCAR=0.0
Pod documented
16  
17 0 ▶sub parse_value { shift; shift->parse_boolean(@_) }
Subroutine parse_value: not called CC=1 SCAR=6.9
Pod documented
18 0 ▶sub format_value { shift; shift->format_boolean(@_) }
Subroutine format_value: not called CC=1 SCAR=6.9
Pod documented
19  
20 sub should_inline_value
21 0 ▶{
Subroutine should_inline_value: not called CC=5 SCAR=29.1
Pod documented
22 0 my($self, $db, $value) = @_;
23 2 ▶ no warnings 'uninitialized';
Subroutine BEGIN: called CC=1 SCAR=0.0
24 0 ▶ return (($db->validate_boolean_keyword($value) && $db->should_inline_boolean_keyword($value)) ||
Branch: 1 branch
BranchTrueFalseTotal
$db->validate_boolean_keyword($value) && $db->should_inline_boolean_keyword($value) || $db->keyword_function_calls && $value =~ /^\w+\(.*\)$/ ? : 0 0 0
Condition0%0/9
$db->validate_boolean_keyword($value) and $db->should_inline_boolean_keyword($value) or $db->keyword_function_calls and $value =~ /^\w+\(.*\)$/
l!l&&r!l&&!r
000
$db->validate_boolean_keyword($value) and $db->should_inline_boolean_keyword($value)
!ll&&!rl&&r
000
$db->keyword_function_calls and $value =~ /^\w+\(.*\)$/
!ll&&!rl&&r
000
MC/DC0%0/4
$db->validate_boolean_keyword($value) and $db->should_inline_boolean_keyword($value) or $db->keyword_function_calls and $value =~ /^\w+\(.*\)$/
$db->validate_boolean_keyword($value) $db->should_inline_boolean_keyword($value) $db->keyword_function_calls $value =~ /^\w+\(.*\)$/
Truth table0%0/7
A and B or C and D
A= $db->validate_boolean_keyword($value)B= $db->should_inline_boolean_keyword($value)C= $db->keyword_function_callsD= $value =~ /^\w+\(.*\)$/
ABCDresult
11XX1
0X111
10111
0X0X0
0X100
100X0
10100
25 ($db->keyword_function_calls && $value =~ /^\w+\(.*\)$/)) ? 1 : 0;
26 }
27  
28 sub perl_column_definition_attributes
29 0 ▶{
Subroutine perl_column_definition_attributes: not called CC=1 SCAR=6.9
Pod undocumented
30 0 grep { $_ ne 'length' } shift->SUPER::perl_column_definition_attributes;
31 }
32  
33 sub method_uses_formatted_key
34 4 ▶{
Subroutine method_uses_formatted_key: called CC=4 SCAR=18.9
Pod undocumented
35 4 my($self, $type) = @_;
36 4 ▶ return 1 if($type eq 'get' || $type eq 'set' || $type eq 'get_set');
Branch: 1 branch
BranchTrueFalseTotal
if $type eq "get" or $type eq "set" or $type eq "get_set" 4 0 4
Condition33%2/6
$type eq "get" or $type eq "set" or $type eq "get_set"
l!l&&r!l&&!r
040
$type eq "get" or $type eq "set"
l!l&&r!l&&!r
004
MC/DC0%0/3
$type eq "get" or $type eq "set" or $type eq "get_set"
$type eq "get" $type eq "set" $type eq "get_set"
Truth table25%1/4
A or B or C
A= $type eq "get"B= $type eq "set"C= $type eq "get_set"
ABCresult
1XX1
01X1
0011
0000
37 0 return 0;
38 }
39  
40 2 1;
41  
42 __END__
« Object/Std/Metadata.pm ↑ Summary Object/Metadata/Column/Bitfield.pm »