Chart/Title.pm

filter: Statementstmt 63.3% 19 / 30 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 66.6% 4 / 6 Podpod 100% 1 / 1 totaltotal 48.0% 24 / 50 CC 6 SCAR 31.6
CC
6
Cov
46%
as_query
42.0
__ANON__
2.0
BEGIN
1.0
CRAP 23.5
« Chart/Data/Extended.pm ↑ Summary Chart/Data/Text.pm »
1 # $Id$
2  
3 package Google::Chart::Title;
4 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Google::Chart::Types;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 coerce 'Google::Chart::Title'
9 => from 'HashRef'
10 0 ▶ => via {
Subroutine __ANON__: not called CC=1 SCAR=6.9
11 0 Google::Chart::Title->new(%$_);
12 }
13 1 ;
14  
15 1 with 'Google::Chart::QueryComponent';
16  
17 1 has 'text' => (
18 is => 'rw',
19 isa => 'Str',
20 required => 1,
21 );
22  
23 1 has 'color' => (
24 is => 'rw',
25 isa => 'Google::Chart::Color',
26 );
27  
28 1 has 'fontsize' => (
29 is => 'rw',
30 isa => 'Num'
31 );
32  
33 1 __PACKAGE__->meta->make_immutable;
34  
35 1 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
36  
37 0 ▶sub as_query {
Subroutine as_query: not called CC=6 SCAR=37.4
Pod documented
38 0 my $self = shift;
39  
40 0 my $text = $self->text;
41 0 $text =~ s/\r?\n/|/gsm;
42 0 my %data = (
43 chtt => $text
44 );
45  
46 0 my $color = $self->color;
47 0 my $fontsize = $self->fontsize;
48 0 ▶ if (defined $color || defined $fontsize) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $color or defined $fontsize) 0 0 0
Condition0%0/3
defined $color or defined $fontsize
l!l&&r!l&&!r
000
MC/DC0%0/2
defined $color or defined $fontsize
defined $color defined $fontsize
Truth table0%0/3
A or B
A= defined $colorB= defined $fontsize
ABresult
1X1
011
000
49 0 ▶ $data{chts} = join(',',
Branch: 2 branches
BranchTrueFalseTotal
defined $color ? : 0 0 0
defined $fontsize ? : 0 0 0
50 defined $color ? $color : '',
51 defined $fontsize ? $fontsize : ''
52 );
53 }
54  
55 return wantarray ? %data :
56 0 ▶ join('&', map { "$_=$data{$_}" } keys %data );
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
57 }
58  
59 1 1;
60  
61 __END__
« Chart/Data/Extended.pm ↑ Summary Chart/Data/Text.pm »