OFC/Dataset.pm

filter: Statementstmt 100% 39 / 39 Branchbran 100% 10 / 10 Conditioncond 88.8% 8 / 9 MC/DCmcdc 83.3% 5 / 6 Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 97.1% 69 / 71 CC 9 SCAR 17.6
CC
9
Cov
98%
_ofc_data_lines
9.0
BEGIN
1.0
BEGIN
1.0
CRAP 5.8
↑ Summary OFC/XAxis.pm »
1 package Chart::OFC::Dataset;
2 33 $Chart::OFC::Dataset::VERSION = '0.12';
3 33 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 33 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 33 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 33 ▶use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 33 ▶use Chart::OFC::Types;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 33 with 'Chart::OFC::Role::OFCDataLines';
11  
12 33 has 'values' =>
13 ( is => 'ro',
14 isa => 'Chart::OFC::Type::NonEmptyArrayRefOfNums',
15 required => 1,
16 auto_deref => 1,
17 );
18  
19 33 has 'links' =>
20 ( is => 'ro',
21 isa => 'Chart::OFC::Type::NonEmptyArrayRef',
22 required => 0,
23 auto_deref => 1,
24 predicate => 'has_links',
25 );
26  
27 sub _ofc_data_lines
28 54 ▶{
Subroutine _ofc_data_lines: called CC=9 SCAR=22.0
29 54 my $self = shift;
30 54 my $count = shift;
31  
32 54 my @lines;
33 54 ▶ if ( $self->can('type') )
Branch: 1 branch
BranchTrueFalseTotal
if ($self->can("type")) 52 2 54
34 {
35 52 my $name = $self->type();
36 52 ▶ $name .= q{_} . $count
Branch: 1 branch
BranchTrueFalseTotal
if $count and $count > 1 11 41 52
Condition100%3/3
$count and $count > 1
!ll&&!rl&&r
33811
MC/DC100%2/2
$count and $count > 1
$count $count > 1
Truth table100%3/3
A and B
A= $countB= $count > 1
ABresult
0X0
100
111
37 if $count && $count > 1;
38  
39 52 push @lines,
40 $self->_data_line( $name, $self->_parameters_for_type() );
41 }
42  
43 54 my $val_name = 'values';
44 54 ▶ $val_name .= q{_} . $count
Branch: 1 branch
BranchTrueFalseTotal
if $count and $count > 1 11 43 54
Condition100%3/3
$count and $count > 1
!ll&&!rl&&r
35811
MC/DC100%2/2
$count and $count > 1
$count $count > 1
Truth table100%3/3
A and B
A= $countB= $count > 1
ABresult
0X0
100
111
45 if $count && $count > 1;
46  
47 54 push @lines,
48 $self->_data_line( $val_name, $self->values() );
49  
50 54 ▶ if ( $self->has_links() )
Branch: 1 branch
BranchTrueFalseTotal
if ($self->has_links) 3 51 54
51 {
52 3 my $links_name = 'links';
53 3 ▶ $links_name .= q{_} . $count
Branch: 1 branch
BranchTrueFalseTotal
if $count and $count > 1 1 2 3
Condition66%2/3
$count and $count > 1
!ll&&!rl&&r
201
MC/DC50%1/2
$count and $count > 1
$count $count > 1
Truth table66%2/3
A and B
A= $countB= $count > 1
ABresult
0X0
100
111
54 if $count && $count > 1;
55  
56 3 push @lines, $self->_data_line( $links_name, $self->links() );
57 }
58  
59 54 return @lines;
60 }
61  
62 33 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
63  
64 33 __PACKAGE__->meta()->make_immutable();
65  
66 33 1;
67  
68  
69 # ABSTRACT: A set of values to be charted
70  
71 __END__
↑ Summary OFC/XAxis.pm »