Chart/GGPlot/Position.pm

filter: Statementstmt 88.5% 54 / 61 Branchbran 40.9% 9 / 22 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.0% 9 / 10 Podpod 0.0% 0 / 4 totaltotal 74.2% 72 / 97 CC 13 SCAR 13.6
CC
13
Cov
76%
compute_panel
9.8
__ANON__
4.2
compute_layer
4.1
CRAP 3.9
« Chart/GGPlot/Scale/DiscretePosition.pm ↑ Summary Chart/GGPlot/Params.pm »
1 package Chart::GGPlot::Position;
2  
3 # ABSTRACT: The position role
4  
5 6 ▶use Chart::GGPlot::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 6 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 6 our $VERSION = '0.002003'; # VERSION
9  
10 6 ▶use PDL::Primitive qw(which);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 6 ▶use Types::Standard qw(CodeRef);
Subroutine BEGIN: called CC=1 SCAR=0.0
12 6 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 6 with qw(Chart::GGPlot::HasRequiredAes);
15  
16 4 ▶method setup_params($data) { return {}; }
Subroutine setup_params: called CC=3 SCAR=11.2
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 2 and Function::Parameters::_croak('Too few arguments for method setup_params (expected 2, got ' . @_ . ')') 0 4 4
@_ > 2 and Function::Parameters::_croak('Too many arguments for method setup_params (expected 2, got ' . @_ . ')') 0 4 4
17  
18 5 ▶method setup_data ($data, $params) {
Subroutine setup_data: called CC=3 SCAR=11.2
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 3 and Function::Parameters::_croak('Too few arguments for method setup_data (expected 3, got ' . @_ . ')') 0 5 5
@_ > 3 and Function::Parameters::_croak('Too many arguments for method setup_data (expected 3, got ' . @_ . ')') 0 5 5
19 5 $self->check_required_aes($data->names);
20 5 return $data;
21 6 }
22  
23 2 ▶method compute_layer ($data, $params, $layout) {
Subroutine compute_layer: called CC=4 SCAR=14.2
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 4 and Function::Parameters::_croak('Too few arguments for method compute_layer (expected 4, got ' . @_ . ')') 0 2 2
@_ > 4 and Function::Parameters::_croak('Too many arguments for method compute_layer (expected 4, got ' . @_ . ')') 0 2 2
24 2 my $panel_data = $data->at('PANEL');
25 2 my $splitted = $data->split($panel_data);
26  
27 2 my $new_df = Data::Frame->new();
28 0 for my $panel_id (sort { $a <=> $b } keys %$splitted) {
29 2 ▶ my $f = fun($df) {
Subroutine __ANON__: called CC=4 SCAR=14.3
Branch: 2 branches
BranchTrueFalseTotal
@_ < 1 and Function::Parameters::_croak('Too few arguments for fun (anon) (expected 1, got ' . @_ . ')') 0 2 2
@_ > 1 and Function::Parameters::_croak('Too many arguments for fun (anon) (expected 1, got ' . @_ . ')') 0 2 2
30 2 ▶ return $df if ($df->isempty);
Branch: 1 branch
BranchTrueFalseTotal
if $df->isempty 0 2 2
31 2 my $scales = $layout->get_scales($panel_id);
32 2 return $self->compute_panel($df, $params, $scales);
33 2 };
34 2 $new_df = $new_df->append($f->($splitted->{$panel_id}));
35 }
36 2 return $new_df;
37 6 }
38  
39 0 ▶method compute_panel($data, $params, $scales) { $data }
Subroutine compute_panel: not called CC=3 SCAR=22.8
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 4 and Function::Parameters::_croak('Too few arguments for method compute_panel (expected 4, got ' . @_ . ')') 0 0 0
@_ > 4 and Function::Parameters::_croak('Too many arguments for method compute_panel (expected 4, got ' . @_ . ')') 0 0 0
40  
41  
42 6 1;
43  
44 __END__
« Chart/GGPlot/Scale/DiscretePosition.pm ↑ Summary Chart/GGPlot/Params.pm »