| 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
| |||||||||||||||||||||||||||||
| 34 | { | ||||||||||||||||||||||||||||
| 35 | 52 | my $name = $self->type(); | |||||||||||||||||||||||||||
| 36 | 52 | ▶ | $name .= q{_} . $count | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$count and $count > 1
MC/DC100%2/2
$count and $count > 1
$count
$count > 1
Truth table100%3/3
A and B
A= $countB= $count > 1
| |||||||||||||||||||||||||||||
| 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
Condition100%3/3
$count and $count > 1
MC/DC100%2/2
$count and $count > 1
$count
$count > 1
Truth table100%3/3
A and B
A= $countB= $count > 1
| |||||||||||||||||||||||||||||
| 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
| |||||||||||||||||||||||||||||
| 51 | { | ||||||||||||||||||||||||||||
| 52 | 3 | my $links_name = 'links'; | |||||||||||||||||||||||||||
| 53 | 3 | ▶ | $links_name .= q{_} . $count | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$count and $count > 1
MC/DC50%1/2
$count and $count > 1
$count
$count > 1
Truth table66%2/3
A and B
A= $countB= $count > 1
| |||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||