line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package # private |
2
|
|
|
|
|
|
|
Net::COLOURlovers::Stat; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use JSON qw( from_json ); |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
6
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub stats_colors { |
10
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
my $response = |
13
|
|
|
|
|
|
|
$self->{'ua'} |
14
|
|
|
|
|
|
|
->post("http://www.colourlovers.com/api/stats/colors?format=json"); |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
return ( from_json $response->content )->{'total'}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub stats_lovers { |
20
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my $response = |
23
|
|
|
|
|
|
|
$self->{'ua'} |
24
|
|
|
|
|
|
|
->post("http://www.colourlovers.com/api/stats/lovers?format=json"); |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
return ( from_json $response->content )->{'total'}; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub stats_palettes { |
30
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
my $response = |
33
|
|
|
|
|
|
|
$self->{'ua'} |
34
|
|
|
|
|
|
|
->post("http://www.colourlovers.com/api/stats/palettes?format=json"); |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
return ( from_json $response->content )->{'total'}; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub stats_patterns { |
40
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
my $response = |
43
|
|
|
|
|
|
|
$self->{'ua'} |
44
|
|
|
|
|
|
|
->post("http://www.colourlovers.com/api/stats/patterns?format=json"); |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
return ( from_json $response->content )->{'total'}; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |