Chart/Type/Bar.pm

filter: Statementstmt 90.0% 18 / 20 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 76.6% 23 / 30 CC 3 SCAR 17.4
CC
3
Cov
75%
parameter_value
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 5.7
« Chart/Types.pm ↑ Summary Chart/Legend.pm »
1 # $Id$
2  
3 package Google::Chart::Type::Bar;
4 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 with 'Google::Chart::Type::Simple';
8  
9 1 enum 'Google::Chart::Type::Bar::Orientation' => qw(horizontal vertical);
10  
11 1 has 'stacked' => (
12 is => 'rw',
13 isa => 'Bool',
14 required => 1,
15 default => 1,
16 );
17  
18 1 has 'orientation' => (
19 is => 'rw',
20 isa => 'Google::Chart::Type::Bar::Orientation',
21 required => 1,
22 default => 'vertical',
23 );
24  
25 1 __PACKAGE__->meta->make_immutable;
26  
27 1 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
28 1 ▶no Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
29  
30 0 ▶sub parameter_value {
Subroutine parameter_value: not called CC=3 SCAR=24.8
Pod documented
31 0 my $self = shift;
32  
33 0 ▶ return sprintf( 'b%s%s',
Branch: 2 branches
BranchTrueFalseTotal
$self->orientation eq 'vertical' ? : 0 0 0
$self->stacked ? : 0 0 0
34 $self->orientation eq 'vertical' ? 'v' : 'h',
35 $self->stacked ? 's' : 'g'
36 );
37 }
38  
39 1 1;
40  
41 __END__
« Chart/Types.pm ↑ Summary Chart/Legend.pm »