Chart/GGPlot/Labels/Functions.pm

filter: Statementstmt 100% 32 / 32 Branchbran 50.0% 6 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 4 / 4 totaltotal 89.0% 49 / 55 CC 7 SCAR 9.0
CC
7
Cov
86%
xlab
3.1
ylab
3.1
ggtitle
3.1
CRAP 2.5
« Chart/GGPlot/Theme/Element.pm ↑ Summary Chart/GGPlot/Position/Identity.pm »
1 package Chart::GGPlot::Labels::Functions;
2  
3 # ABSTRACT: Function interface for Chart::GGPlot::Labels
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::Labels;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 3 ▶use parent qw(Exporter::Tiny);
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 3 our @EXPORT_OK = qw(
14 labs xlab ylab ggtitle
15 );
16 3 our %EXPORT_TAGS = (
17 all => \@EXPORT_OK,
18 ggplot => [qw(labs xlab ylab ggtitle)]
19 );
20  
21  
22 1 ▶sub labs {
Subroutine labs: called CC=1 SCAR=0.0
Pod documented
23 1 return Chart::GGPlot::Labels->new(@_);
24 }
25  
26  
27 1 ▶fun xlab($label) {
Subroutine xlab: called CC=3 SCAR=11.3
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 1 and Function::Parameters::_croak('Too few arguments for fun xlab (expected 1, got ' . @_ . ')') 0 1 1
@_ > 1 and Function::Parameters::_croak('Too many arguments for fun xlab (expected 1, got ' . @_ . ')') 0 1 1
28 1 return Chart::GGPlot::Labels->new( x => $label );
29 3 }
30  
31 1 ▶fun ylab($label) {
Subroutine ylab: called CC=3 SCAR=11.3
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 1 and Function::Parameters::_croak('Too few arguments for fun ylab (expected 1, got ' . @_ . ')') 0 1 1
@_ > 1 and Function::Parameters::_croak('Too many arguments for fun ylab (expected 1, got ' . @_ . ')') 0 1 1
32 1 return Chart::GGPlot::Labels->new( y => $label );
33 3 }
34  
35  
36 1 ▶fun ggtitle( $title, $subtitle = undef ) {
Subroutine ggtitle: called CC=3 SCAR=11.3
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 1 and Function::Parameters::_croak('Too few arguments for fun ggtitle (expected 1, got ' . @_ . ')') 0 1 1
@_ > 2 and Function::Parameters::_croak('Too many arguments for fun ggtitle (expected 2, got ' . @_ . ')') 0 1 1
37 1 return Chart::GGPlot::Labels->new(
38 title => $title,
39 maybe subtitle => $subtitle,
40 );
41 3 }
42  
43 3 1;
44  
45 __END__
« Chart/GGPlot/Theme/Element.pm ↑ Summary Chart/GGPlot/Position/Identity.pm »