line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Face::Response::Photo; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
91
|
use 5.006; |
|
6
|
|
|
|
|
19
|
|
|
6
|
|
|
|
|
229
|
|
4
|
6
|
|
|
6
|
|
28
|
use strict; |
|
6
|
|
|
|
|
144
|
|
|
6
|
|
|
|
|
177
|
|
5
|
6
|
|
|
6
|
|
29
|
use warnings; |
|
6
|
|
|
|
|
18
|
|
|
6
|
|
|
|
|
145
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
3596
|
use WebService::Face::Response::Tag; |
|
6
|
|
|
|
|
16
|
|
|
6
|
|
|
|
|
1887
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
WebService::Face::Client::Photo |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 VERSION |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Version 0.04 |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=cut |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SYNOPSIS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
WebService::Face::Response::Photo wraps the data returned by the server for photos |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
It provides a simple OO interface to access the data |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 new ( \%params ) |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
The constructor for the WebService::Face::Client::Photo class |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub new { |
36
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
37
|
0
|
|
|
|
|
|
my $params = shift; |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
for my $key ( keys %$params ) { |
42
|
0
|
|
|
|
|
|
$self->{$key} = $params->{$key}; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
0
|
0
|
|
|
|
|
if ( $params->{tags} ) { |
46
|
0
|
|
|
|
|
|
my @tags; |
47
|
0
|
|
|
|
|
|
for my $tag ( @{ $params->{tags} } ) { |
|
0
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# Add a reference back to the parent photo |
50
|
0
|
|
|
|
|
|
$tag->{photo} = $self; |
51
|
0
|
|
|
|
|
|
push @tags, WebService::Face::Response::Tag->new($tag); |
52
|
|
|
|
|
|
|
} |
53
|
0
|
|
|
|
|
|
@{ $self->{tags} } = @tags; |
|
0
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
return $self; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 width () |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Getter for the 'width' attribute |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub width { |
66
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
return $self->{'width'}; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 height () |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Getter for the 'height' attribute |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub height { |
78
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
return $self->{'height'}; |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head2 url () |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Getter for the 'url' attribute |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
sub url { |
90
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
91
|
|
|
|
|
|
|
|
92
|
0
|
|
|
|
|
|
return $self->{'url'}; |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 pid () |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Getter for the 'pid' attribute |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=cut |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
sub pid { |
102
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
103
|
|
|
|
|
|
|
|
104
|
0
|
|
|
|
|
|
return $self->{'pid'}; |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head2 tags () |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Getter for the 'tags' attribute |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=cut |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
sub tags { |
114
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
115
|
|
|
|
|
|
|
|
116
|
0
|
|
|
|
|
|
return @{ $self->{'tags'} }; |
|
0
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head1 AUTHOR |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Arnaud (Arhuman) ASSAD, C<< >> |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 BUGS |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Please report any bugs or feature requests to C< arhuman at gmail.com>, or through |
126
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
127
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head1 SUPPORT |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
perldoc WebService::Face::Client |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
You can also look for information at: |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=over 4 |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=item * Github repository |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
L |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
L |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=item * CPAN Ratings |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
L |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=back |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
More information about Face.com service : |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
L |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
Thanks to Face.com for the service they provide. |
161
|
|
|
|
|
|
|
Thanks to Jaguar Network for allowing me to publish my work. |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
Copyright 2012 Arnaud (Arhuman) ASSAD. |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
168
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
169
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=cut |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
1; |