line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Flickr::Types::Tools; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
770
|
use strictures; |
|
1
|
|
|
|
|
1747
|
|
|
1
|
|
|
|
|
6
|
|
4
|
1
|
|
|
1
|
|
213
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
83
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.22'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use Type::Library |
9
|
1
|
|
|
|
|
12
|
-base, |
10
|
|
|
|
|
|
|
-declare => qw( |
11
|
|
|
|
|
|
|
FlickrAPI |
12
|
|
|
|
|
|
|
FlickrAPIcameras |
13
|
|
|
|
|
|
|
FlickrAPIargs |
14
|
|
|
|
|
|
|
FlickrPermStr |
15
|
|
|
|
|
|
|
FlickrToken |
16
|
|
|
|
|
|
|
HexNum |
17
|
1
|
|
|
1
|
|
825
|
); |
|
1
|
|
|
|
|
27696
|
|
18
|
1
|
|
|
1
|
|
3203
|
use Type::Utils -all; |
|
1
|
|
|
|
|
4812
|
|
|
1
|
|
|
|
|
10
|
|
19
|
1
|
|
|
1
|
|
3917
|
use Types::Standard qw ( Optional Dict Int Str InstanceOf Any ); |
|
1
|
|
|
|
|
42398
|
|
|
1
|
|
|
|
|
12
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
declare FlickrAPI, |
22
|
|
|
|
|
|
|
api => InstanceOf ["Flickr::API"]; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
declare FlickrAPIcameras, api => InstanceOf ["Flickr::API::Cameras"]; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
declare HexNum, |
27
|
|
|
|
|
|
|
as Str, |
28
|
|
|
|
|
|
|
where { /^[a-f0-9]+$/i }; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
declare FlickrToken, |
31
|
|
|
|
|
|
|
as Str, |
32
|
|
|
|
|
|
|
where { /^[a-f0-9\-]+$/i }; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
declare FlickrPermStr, |
35
|
|
|
|
|
|
|
as Str, |
36
|
|
|
|
|
|
|
where { /none|read|write|delete/i }; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
declare FlickrAPIargs, |
40
|
|
|
|
|
|
|
as Dict [ |
41
|
|
|
|
|
|
|
consumer_key => HexNum, |
42
|
|
|
|
|
|
|
consumer_secret => HexNum, |
43
|
|
|
|
|
|
|
access_token => Optional [Any], |
44
|
|
|
|
|
|
|
callback => Optional [Str], |
45
|
|
|
|
|
|
|
nonce => Optional [Str], |
46
|
|
|
|
|
|
|
request_method => Optional [Str], |
47
|
|
|
|
|
|
|
request_url => Optional [Str], |
48
|
|
|
|
|
|
|
signature_method => Optional [Str], |
49
|
|
|
|
|
|
|
timestamp => Optional [Int], |
50
|
|
|
|
|
|
|
token => Optional [FlickrToken], |
51
|
|
|
|
|
|
|
token_secret => Optional [HexNum], |
52
|
|
|
|
|
|
|
version => Optional [Str], |
53
|
|
|
|
|
|
|
]; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__END__ |