Chart/GGPlot/Theme/Element/Functions.pm

filter: Statementstmt 100% 30 / 30 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 1 / 1 totaltotal 95.2% 40 / 42 CC 3 SCAR 5.3
CC
3
Cov
94%
rel
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.7
« Chart/GGPlot/Setup.pm ↑ Summary PDL/Role/HasNames.pm »
1 package Chart::GGPlot::Theme::Element::Functions;
2  
3 # ABSTRACT:
4  
5 3 ▶use Chart::GGPlot::Setup;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 our $VERSION = '0.002003'; # VERSION
8  
9 3 ▶use Chart::GGPlot::Theme::Element;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 3 ▶use Chart::GGPlot::Theme::Rel;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 3 ▶use parent qw(Exporter::Tiny);
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 3 our @EXPORT_OK = qw(
15 element_blank element_rect element_line element_text
16 rel
17 );
18 3 our %EXPORT_TAGS = (
19 all => \@EXPORT_OK,
20 ggplot => [qw(
21 element_blank element_rect element_line element_text
22 rel)]
23 );
24  
25  
26 3 for my $x (qw(blank rect line text)) {
27 12 my $class = 'Chart::GGPlot::Theme::Element::' . ucfirst($x);
28  
29 3 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
30 322 ▶ *{"element_${x}"} = sub { $class->new(@_); }
Subroutine __ANON__: called CC=1 SCAR=0.0
31 12 }
32  
33  
34 82 ▶fun rel($x) {
Subroutine rel: called CC=3 SCAR=11.3
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 1 and Function::Parameters::_croak('Too few arguments for fun rel (expected 1, got ' . @_ . ')') 0 82 82
@_ > 1 and Function::Parameters::_croak('Too many arguments for fun rel (expected 1, got ' . @_ . ')') 0 82 82
35 82 return Chart::GGPlot::Theme::Rel->new($x);
36 3 }
37  
38  
39 3 1;
40  
41 __END__
« Chart/GGPlot/Setup.pm ↑ Summary PDL/Role/HasNames.pm »