Chart/GGPlot/Scale/ContinuousPosition.pm

filter: Statementstmt 95.1% 39 / 41 Branchbran 57.1% 8 / 14 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 1 totaltotal 80.8% 55 / 68 CC 9 SCAR 14.8
CC
9
Cov
83%
:around
7.3
map_to_limits
4.2
BEGIN
1.0
CRAP 4.4
« Chart/GGPlot/ScalesList.pm ↑ Summary Chart/GGPlot/Scale/DiscretePosition.pm »
1 package Chart::GGPlot::Scale::ContinuousPosition;
2  
3 # ABSTRACT: Continuous position scale
4  
5 4 ▶use Chart::GGPlot::Class qw(:pdl);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 4 our $VERSION = '0.002003'; # VERSION
9  
10 4 ▶use Types::PDL qw(Piddle PiddleFromAny);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 4 ▶use Types::Standard qw(InstanceOf Maybe);
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 4 ▶use Chart::GGPlot::Util qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 4 extends qw(
16 Chart::GGPlot::Scale::Continuous
17 );
18  
19 4 with qw(
20 Chart::GGPlot::Scale::Positional
21 Chart::GGPlot::Scale::SupportsSecondaryAxis
22 );
23  
24 4 has '+limits' => (
25 isa => Piddle->plus_coercions(PiddleFromAny),
26 coerce => 1,
27 );
28  
29 28 ▶method map_to_limits ( $p, $limits = $self->get_limits ) {
Subroutine map_to_limits: called CC=4 SCAR=14.2
Pod undocumented
Branch: 3 branches
BranchTrueFalseTotal
@_ < 2 and Function::Parameters::_croak('Too few arguments for method map_to_limits (expected 2, got ' . @_ . ')') 0 28 28
@_ > 3 and Function::Parameters::_croak('Too many arguments for method map_to_limits (expected 3, got ' . @_ . ')') 0 28 28
@_ < 2 and $limits = $self->get_limits 28 0 28
30 28 my $scaled = $self->oob->( $p, $limits );
31 28 $scaled->setbadtoval($self->na_value);
32 28 return $scaled;
33 4 }
34  
35 10 ▶around break_info ($range = null()) {
Subroutine :around: called CC=6 SCAR=19.9
Branch: 3 branches
BranchTrueFalseTotal
@_ < 2 and Function::Parameters::_croak('Too few arguments for around break_info (expected 2, got ' . @_ . ')') 0 10 10
@_ > 3 and Function::Parameters::_croak('Too many arguments for around break_info (expected 3, got ' . @_ . ')') 0 10 10
@_ < 1 and $range = null() 1 9 10
36 10 my $breaks = $self->$orig($range);
37 10 ▶ if ( defined $self->secondary_axis
Branch: 1 branch
BranchTrueFalseTotal
if (defined $self->secondary_axis and not $self->secondary_axis->empty) 0 10 10
Condition33%1/3
defined $self->secondary_axis and not $self->secondary_axis->empty
!ll&&!rl&&r
1000
MC/DC0%0/2
defined $self->secondary_axis and not $self->secondary_axis->empty
defined $self->secondary_axis not $self->secondary_axis->empty
Truth table33%1/3
A and not(B)
A= defined $self->secondary_axisB= not $self->secondary_axis->empty
ABresult
0X0
100
111
38 and not $self->secondary_axis->empty() )
39 {
40 0 $self->secondary_axis->init($self);
41 0 $breaks = [
42 $breaks->flatten,
43 $self->secondary_axis->break_info( $breaks->range, $self )->flatten
44 ];
45 }
46 10 return $breaks;
47 4 }
48  
49 4 __PACKAGE__->meta->make_immutable;
50  
51 4 1;
52  
53 __END__
« Chart/GGPlot/ScalesList.pm ↑ Summary Chart/GGPlot/Scale/DiscretePosition.pm »