OFC/Dataset/LineWithDots.pm

filter: Statementstmt 100% 30 / 30 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 1 totaltotal 97.6% 42 / 43 CC 3 SCAR 3.4
CC
3
Cov
100%
type
2.0
_parameters_for_type
2.0
BEGIN
1.0
CRAP 1.4
« OFC/Dataset/Area.pm ↑ Summary OFC/Pie.pm »
1 package Chart::OFC::Dataset::LineWithDots;
2 20 $Chart::OFC::Dataset::LineWithDots::VERSION = '0.12';
3 20 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 20 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 20 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 20 ▶use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 20 ▶use Chart::OFC::Types;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 20 extends 'Chart::OFC::Dataset::Line';
11  
12 20 has solid_dots =>
13 ( is => 'ro',
14 isa => 'Bool',
15 default => 1,
16 );
17  
18 20 has dot_size =>
19 ( is => 'ro',
20 isa => 'Chart::OFC::Type::PosInt',
21 default => 5,
22 );
23  
24 sub type
25 6 ▶{
Subroutine type: called CC=2 SCAR=6.9
Pod undocumented
26 6 my $self = shift;
27  
28 6 ▶ return $self->solid_dots() ? 'line_dot' : 'line_hollow';
Branch: 1 branch
BranchTrueFalseTotal
$self->solid_dots ? : 5 1 6
29 }
30  
31 sub _parameters_for_type
32 6 ▶{
Subroutine _parameters_for_type: called CC=2 SCAR=6.9
33 6 my $self = shift;
34  
35 6 my @p = ( $self->width(), $self->color() );
36 6 ▶ push @p, ( $self->label(), $self->text_size(), $self->dot_size() )
Branch: 1 branch
BranchTrueFalseTotal
if $self->_has_label 5 1 6
37 if $self->_has_label();
38  
39 6 return @p;
40 }
41  
42 20 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
43  
44 20 __PACKAGE__->meta()->make_immutable();
45  
46 20 1;
47  
48  
49 # ABSTRACT: A dataset represented as a line with dots for each value
50  
51 __END__
« OFC/Dataset/Area.pm ↑ Summary OFC/Pie.pm »