| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package WebService::Face::Response::Tag; |
|
2
|
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
84
|
use 5.006; |
|
|
6
|
|
|
|
|
16
|
|
|
|
6
|
|
|
|
|
207
|
|
|
4
|
6
|
|
|
6
|
|
35
|
use strict; |
|
|
6
|
|
|
|
|
11
|
|
|
|
6
|
|
|
|
|
165
|
|
|
5
|
6
|
|
|
6
|
|
38
|
use warnings; |
|
|
6
|
|
|
|
|
7
|
|
|
|
6
|
|
|
|
|
4640
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
WebService::Face::Client::Tag |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 VERSION |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Version 0.04 |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=cut |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
WebService::Face::Response::Tag wraps the data returned by the server for tags |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
It provides a simple OO interface to access the data |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head2 new ( \%params ) |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
The constructor for the ace::Client::Response::Tag class |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub new { |
|
34
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
|
35
|
0
|
|
|
|
|
|
my $params = shift; |
|
36
|
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
my $self = {}; |
|
38
|
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
for my $key ( keys %$params ) { |
|
40
|
0
|
|
|
|
|
|
$self->{$key} = $params->{$key}; |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
return bless( $self, $class ); |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 width () |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Getter for the 'width' attribute |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub width { |
|
53
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
54
|
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
return $self->{'width'}; |
|
56
|
|
|
|
|
|
|
} |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 height () |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Getter for the 'height' attribute |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub height { |
|
65
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
66
|
|
|
|
|
|
|
|
|
67
|
0
|
|
|
|
|
|
return $self->{'height'}; |
|
68
|
|
|
|
|
|
|
} |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 center () |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Getter for the 'center' attribute |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=cut |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
sub center { |
|
77
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
78
|
|
|
|
|
|
|
|
|
79
|
0
|
|
|
|
|
|
return $self->{'center'}; |
|
80
|
|
|
|
|
|
|
} |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 eye_left () |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Getter for the 'eye_left' attribute |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=cut |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub eye_left { |
|
89
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
90
|
|
|
|
|
|
|
|
|
91
|
0
|
|
|
|
|
|
return $self->{'eye_left'}; |
|
92
|
|
|
|
|
|
|
} |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 eye_right () |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Getter for the 'eye_right' attribute |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
sub eye_right { |
|
101
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
102
|
|
|
|
|
|
|
|
|
103
|
0
|
|
|
|
|
|
return $self->{'eye_right'}; |
|
104
|
|
|
|
|
|
|
} |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 mouth_left () |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Getter for the 'mouth_left' attribute |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=cut |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
sub mouth_left { |
|
113
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
114
|
|
|
|
|
|
|
|
|
115
|
0
|
|
|
|
|
|
return $self->{'mouth_left'}; |
|
116
|
|
|
|
|
|
|
} |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head2 mouth_center () |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Getter for the 'mouth_center' attribute |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=cut |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
sub mouth_center { |
|
125
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
126
|
|
|
|
|
|
|
|
|
127
|
0
|
|
|
|
|
|
return $self->{'mouth_center'}; |
|
128
|
|
|
|
|
|
|
} |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head2 mouth_right () |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
Getter for the 'mouth_right' attribute |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=cut |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
sub mouth_right { |
|
137
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
138
|
|
|
|
|
|
|
|
|
139
|
0
|
|
|
|
|
|
return $self->{'mouth_right'}; |
|
140
|
|
|
|
|
|
|
} |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head2 nose () |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
Getter for the 'nose' attribute |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=cut |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
sub nose { |
|
149
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
150
|
|
|
|
|
|
|
|
|
151
|
0
|
|
|
|
|
|
return $self->{'nose'}; |
|
152
|
|
|
|
|
|
|
} |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=head2 yaw () |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
Getter for the 'yaw' attribute |
|
157
|
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=cut |
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
sub yaw { |
|
161
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
162
|
|
|
|
|
|
|
|
|
163
|
0
|
|
|
|
|
|
return $self->{'yaw'}; |
|
164
|
|
|
|
|
|
|
} |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
=head2 pitch () |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
Getter for the 'pitch' attribute |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=cut |
|
171
|
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
sub pitch { |
|
173
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
174
|
|
|
|
|
|
|
|
|
175
|
0
|
|
|
|
|
|
return $self->{'pitch'}; |
|
176
|
|
|
|
|
|
|
} |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=head2 roll () |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
Getter for the 'roll' attribute |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=cut |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
sub roll { |
|
185
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
186
|
|
|
|
|
|
|
|
|
187
|
0
|
|
|
|
|
|
return $self->{'roll'}; |
|
188
|
|
|
|
|
|
|
} |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
=head2 attributes () |
|
191
|
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
Getter for the 'attributes' data member (yep I mean attribute ;-) |
|
193
|
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
=cut |
|
195
|
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
sub attributes { |
|
197
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
198
|
|
|
|
|
|
|
|
|
199
|
0
|
|
|
|
|
|
return $self->{'attributes'}; |
|
200
|
|
|
|
|
|
|
} |
|
201
|
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=head2 gender () |
|
203
|
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
Getter for the 'gender' attribute |
|
205
|
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
=cut |
|
207
|
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
sub gender { |
|
209
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
210
|
|
|
|
|
|
|
|
|
211
|
0
|
|
|
|
|
|
return $self->{'gender'}; |
|
212
|
|
|
|
|
|
|
} |
|
213
|
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
=head2 glasses () |
|
215
|
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
Getter for the 'glasses' attribute |
|
217
|
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
=cut |
|
219
|
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
sub glasses { |
|
221
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
222
|
|
|
|
|
|
|
|
|
223
|
0
|
|
|
|
|
|
return $self->{'glasses'}; |
|
224
|
|
|
|
|
|
|
} |
|
225
|
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
=head2 smiling () |
|
227
|
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
Getter for the 'smiling' attribute |
|
229
|
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
=cut |
|
231
|
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
sub smiling { |
|
233
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
234
|
|
|
|
|
|
|
|
|
235
|
0
|
|
|
|
|
|
return $self->{'smiling'}; |
|
236
|
|
|
|
|
|
|
} |
|
237
|
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
=head2 tid () |
|
239
|
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
Getter for the 'tid' attribute |
|
241
|
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
=cut |
|
243
|
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
sub tid { |
|
245
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
246
|
|
|
|
|
|
|
|
|
247
|
0
|
|
|
|
|
|
return $self->{'tid'}; |
|
248
|
|
|
|
|
|
|
} |
|
249
|
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
=head2 mood () |
|
251
|
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
Getter for the 'mood' attribute |
|
253
|
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
=cut |
|
255
|
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
sub mood { |
|
257
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
258
|
|
|
|
|
|
|
|
|
259
|
0
|
|
|
|
|
|
return $self->{'mood'}; |
|
260
|
|
|
|
|
|
|
} |
|
261
|
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
=head2 lips () |
|
263
|
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
Getter for the 'lips' attribute |
|
265
|
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
=cut |
|
267
|
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
sub lips { |
|
269
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
270
|
|
|
|
|
|
|
|
|
271
|
0
|
|
|
|
|
|
return $self->{'lips'}; |
|
272
|
|
|
|
|
|
|
} |
|
273
|
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
=head2 face () |
|
275
|
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
Getter for the 'face' attribute |
|
277
|
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
=cut |
|
279
|
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
sub face { |
|
281
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
282
|
|
|
|
|
|
|
|
|
283
|
0
|
|
|
|
|
|
return $self->{'face'}; |
|
284
|
|
|
|
|
|
|
} |
|
285
|
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
=head2 recognizable () |
|
287
|
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
Getter for the 'recognizable' attribute |
|
289
|
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
=cut |
|
291
|
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
sub recognizable { |
|
293
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
294
|
|
|
|
|
|
|
|
|
295
|
0
|
|
|
|
|
|
return $self->{'recognizable'}; |
|
296
|
|
|
|
|
|
|
} |
|
297
|
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
=head2 uids () |
|
299
|
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
Getter for the 'uids' attribute |
|
301
|
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
=cut |
|
303
|
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
sub uids { |
|
305
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
306
|
|
|
|
|
|
|
|
|
307
|
0
|
|
|
|
|
|
return $self->{'uids'}; |
|
308
|
|
|
|
|
|
|
} |
|
309
|
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
=head2 recognized () |
|
311
|
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
Return the uid of the recognized user |
|
313
|
|
|
|
|
|
|
(undef if no user recognized) |
|
314
|
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
=cut |
|
316
|
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
sub recognized { |
|
318
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
319
|
|
|
|
|
|
|
|
|
320
|
0
|
0
|
0
|
|
|
|
if ( $self->recognizable and @{ $self->uids } ) { |
|
|
0
|
|
|
|
|
|
|
|
321
|
0
|
|
|
|
|
|
return shift @{ $self->uids }; |
|
|
0
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
} |
|
323
|
|
|
|
|
|
|
else { |
|
324
|
0
|
|
|
|
|
|
return; |
|
325
|
|
|
|
|
|
|
} |
|
326
|
|
|
|
|
|
|
} |
|
327
|
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
=head1 AUTHOR |
|
329
|
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
Arnaud (Arhuman) ASSAD, C<< >> |
|
331
|
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
=head1 BUGS |
|
333
|
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
Please report any bugs or feature requests to C< arhuman at gmail.com>, or through |
|
335
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
|
336
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
|
337
|
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
=head1 SUPPORT |
|
339
|
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
|
341
|
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
perldoc WebService::Face::Client |
|
343
|
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
You can also look for information at: |
|
345
|
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
=over 4 |
|
347
|
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
=item * Github repository |
|
349
|
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
L |
|
351
|
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
|
353
|
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
L |
|
355
|
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
=item * CPAN Ratings |
|
357
|
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
L |
|
359
|
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
=back |
|
361
|
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
More information about Face.com service : |
|
363
|
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
L |
|
365
|
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
|
367
|
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
Thanks to Face.com for the service they provide. |
|
369
|
|
|
|
|
|
|
Thanks to Jaguar Network for allowing me to publish my work. |
|
370
|
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
372
|
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
Copyright 2012 Arnaud (Arhuman) ASSAD. |
|
374
|
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
|
376
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
|
377
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
|
378
|
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
|
380
|
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
=cut |
|
382
|
|
|
|
|
|
|
|
|
383
|
|
|
|
|
|
|
1; |