line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id$ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Google::Chart::Title; |
4
|
1
|
|
|
1
|
|
6
|
use Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
5
|
1
|
|
|
1
|
|
7118
|
use Google::Chart::Types; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
10
|
|
6
|
1
|
|
|
1
|
|
167
|
use Moose::Util::TypeConstraints; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
11
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
coerce 'Google::Chart::Title' |
9
|
|
|
|
|
|
|
=> from 'HashRef' |
10
|
|
|
|
|
|
|
=> via { |
11
|
|
|
|
|
|
|
Google::Chart::Title->new(%$_); |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
with 'Google::Chart::QueryComponent'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has 'text' => ( |
18
|
|
|
|
|
|
|
is => 'rw', |
19
|
|
|
|
|
|
|
isa => 'Str', |
20
|
|
|
|
|
|
|
required => 1, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has 'color' => ( |
24
|
|
|
|
|
|
|
is => 'rw', |
25
|
|
|
|
|
|
|
isa => 'Google::Chart::Color', |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
has 'fontsize' => ( |
29
|
|
|
|
|
|
|
is => 'rw', |
30
|
|
|
|
|
|
|
isa => 'Num' |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
1
|
|
2513
|
no Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
15
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub as_query { |
38
|
0
|
|
|
0
|
1
|
|
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
|
0
|
0
|
|
|
|
if (defined $color || defined $fontsize) { |
49
|
0
|
0
|
|
|
|
|
$data{chts} = join(',', |
|
|
0
|
|
|
|
|
|
50
|
|
|
|
|
|
|
defined $color ? $color : '', |
51
|
|
|
|
|
|
|
defined $fontsize ? $fontsize : '' |
52
|
|
|
|
|
|
|
); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
return wantarray ? %data : |
56
|
0
|
0
|
|
|
|
|
join('&', map { "$_=$data{$_}" } keys %data ); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
__END__ |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 NAME |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Google::Chart::Title - Apply Title |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 METHODS |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 as_query |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |