Object/Metadata/Column/Array.pm

filter: Statementstmt 78.1% 25 / 32 Branchbran 25.0% 1 / 4 Conditioncond 13.3% 2 / 15 MC/DCmcdc 0.0% 0 / 7 Subroutinesub 70.0% 7 / 10 Podpod 80.0% 4 / 5 totaltotal 53.4% 39 / 73 CC 8 SCAR 20.2
CC
8
Cov
55%
should_inline_value
18.4
method_uses_formatted_key
6.6
parse_value
2.0
CRAP 7.6
« Object/Metadata/Column/Bitfield.pm ↑ Summary Object/Metadata/Relationship/OneToOne.pm »
1 package Rose::DB::Object::Metadata::Column::Array;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use Rose::Object::MakeMethods::Generic;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Rose::DB::Object::MakeMethods::Generic;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use Rose::DB::Object::Metadata::Column;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 our @ISA = qw(Rose::DB::Object::Metadata::Column);
10  
11 2 our $VERSION = '0.788';
12  
13 2 __PACKAGE__->add_common_method_maker_argument_names
14 (
15 qw(default dimensions)
16 );
17  
18 2 Rose::Object::MakeMethods::Generic->make_methods
19 (
20 { preserve_existing => 1 },
21 scalar => [ __PACKAGE__->common_method_maker_argument_names ]
22 );
23  
24 4 ▶sub type { 'array' }
Subroutine type: called CC=1 SCAR=0.0
Pod documented
25  
26 2 foreach my $type (__PACKAGE__->available_method_types)
27 {
28 6 __PACKAGE__->method_maker_type($type => 'array')
29 }
30  
31 sub should_inline_value
32 0 ▶{
Subroutine should_inline_value: not called CC=5 SCAR=29.1
Pod documented
33 0 my($self, $db, $value) = @_;
34 2 ▶ no warnings 'uninitialized';
Subroutine BEGIN: called CC=1 SCAR=0.0
35 0 ▶ return (($db->validate_array_keyword($value) && $db->should_inline_array_keyword($value)) ||
Branch: 1 branch
BranchTrueFalseTotal
$db->validate_array_keyword($value) && $db->should_inline_array_keyword($value) || $db->keyword_function_calls && $value =~ /^\w+\(.*\)$/ ? : 0 0 0
Condition0%0/9
$db->validate_array_keyword($value) and $db->should_inline_array_keyword($value) or $db->keyword_function_calls and $value =~ /^\w+\(.*\)$/
l!l&&r!l&&!r
000
$db->validate_array_keyword($value) and $db->should_inline_array_keyword($value)
!ll&&!rl&&r
000
$db->keyword_function_calls and $value =~ /^\w+\(.*\)$/
!ll&&!rl&&r
000
MC/DC0%0/4
$db->validate_array_keyword($value) and $db->should_inline_array_keyword($value) or $db->keyword_function_calls and $value =~ /^\w+\(.*\)$/
$db->validate_array_keyword($value) $db->should_inline_array_keyword($value) $db->keyword_function_calls $value =~ /^\w+\(.*\)$/
Truth table0%0/7
A and B or C and D
A= $db->validate_array_keyword($value)B= $db->should_inline_array_keyword($value)C= $db->keyword_function_callsD= $value =~ /^\w+\(.*\)$/
ABCDresult
11XX1
0X111
10111
0X0X0
0X100
100X0
10100
36 ($db->keyword_function_calls && $value =~ /^\w+\(.*\)$/)) ? 1 : 0;
37 }
38  
39 0 ▶sub parse_value { shift; shift->parse_array(@_) }
Subroutine parse_value: not called CC=1 SCAR=6.9
Pod documented
40 0 ▶sub format_value { shift; shift->format_array(@_) }
Subroutine format_value: not called CC=1 SCAR=6.9
Pod documented
41  
42 sub method_uses_formatted_key
43 1 ▶{
Subroutine method_uses_formatted_key: called CC=4 SCAR=18.9
Pod undocumented
44 1 my($self, $type) = @_;
45 1 ▶ 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" 1 0 1
Condition33%2/6
$type eq "get" or $type eq "set" or $type eq "get_set"
l!l&&r!l&&!r
010
$type eq "get" or $type eq "set"
l!l&&r!l&&!r
001
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
46 0 return 0;
47 }
48  
49 2 1;
50  
51 __END__
« Object/Metadata/Column/Bitfield.pm ↑ Summary Object/Metadata/Relationship/OneToOne.pm »