line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Amazon::S3::Constants; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
52
|
|
4
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
51
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
450
|
use parent qw(Exporter); |
|
2
|
|
|
|
|
307
|
|
|
2
|
|
|
|
|
9
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
1082
|
use Readonly; |
|
2
|
|
|
|
|
8048
|
|
|
2
|
|
|
|
|
1452
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.63'; ## no critic (RequireInterpolation) |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# defaults |
13
|
|
|
|
|
|
|
Readonly our $AMAZON_HEADER_PREFIX => 'x-amz-'; |
14
|
|
|
|
|
|
|
Readonly our $DEFAULT_BUFFER_SIZE => 4 * 1024; |
15
|
|
|
|
|
|
|
Readonly our $DEFAULT_HOST => 's3.amazonaws.com'; |
16
|
|
|
|
|
|
|
Readonly our $DEFAULT_TIMEOUT => 30; |
17
|
|
|
|
|
|
|
Readonly our $KEEP_ALIVE_CACHESIZE => 0; |
18
|
|
|
|
|
|
|
Readonly our $METADATA_PREFIX => 'x-amz-meta-'; |
19
|
|
|
|
|
|
|
Readonly our $MAX_BUCKET_NAME_LENGTH => 64; |
20
|
|
|
|
|
|
|
Readonly our $MIN_BUCKET_NAME_LENGTH => 3; |
21
|
|
|
|
|
|
|
Readonly our $MIN_MULTIPART_UPLOAD_CHUNK_SIZE => 5 * 1024 * 1024; |
22
|
|
|
|
|
|
|
Readonly our $DEFAULT_LOG_LEVEL => 'error'; |
23
|
|
|
|
|
|
|
Readonly our $MAX_DELETE_KEYS => 1000; |
24
|
|
|
|
|
|
|
Readonly our $MAX_RETRIES => 5; |
25
|
|
|
|
|
|
|
Readonly our $DEFAULT_REGION => 'us-east-1'; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Readonly our $XMLDECL => ''; |
28
|
|
|
|
|
|
|
Readonly our $S3_XMLNS => 'http://s3.amazonaws.com/doc/2006-03-01/'; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Readonly::Hash our %LOG_LEVELS => ( |
31
|
|
|
|
|
|
|
trace => 5, |
32
|
|
|
|
|
|
|
debug => 4, |
33
|
|
|
|
|
|
|
info => 3, |
34
|
|
|
|
|
|
|
warn => 2, |
35
|
|
|
|
|
|
|
error => 1, |
36
|
|
|
|
|
|
|
fatal => 0, |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Readonly::Hash our %LIST_OBJECT_MARKERS => ( |
40
|
|
|
|
|
|
|
'2' => [qw(ContinuationToken NextContinuationToken continuation-token)], |
41
|
|
|
|
|
|
|
'1' => [qw(Marker NextMarker marker)], |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# booleans |
45
|
|
|
|
|
|
|
Readonly our $TRUE => 1; |
46
|
|
|
|
|
|
|
Readonly our $FALSE => 0; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# chars |
49
|
|
|
|
|
|
|
Readonly our $COMMA => q{,}; |
50
|
|
|
|
|
|
|
Readonly our $COLON => q{:}; |
51
|
|
|
|
|
|
|
Readonly our $DOT => q{.}; |
52
|
|
|
|
|
|
|
Readonly our $DOUBLE_COLON => q{::}; |
53
|
|
|
|
|
|
|
Readonly our $EMPTY => q{}; |
54
|
|
|
|
|
|
|
Readonly our $SLASH => q{/}; |
55
|
|
|
|
|
|
|
Readonly our $QUESTION_MARK => q{?}; |
56
|
|
|
|
|
|
|
Readonly our $AMPERSAND => q{&}; |
57
|
|
|
|
|
|
|
Readonly our $EQUAL_SIGN => q{=}; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
# HTTP codes |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Readonly our $HTTP_BAD_REQUEST => 400; |
62
|
|
|
|
|
|
|
Readonly our $HTTP_UNAUTHORIZED => 401; |
63
|
|
|
|
|
|
|
Readonly our $HTTP_PAYMENT_RQUIRED => 402; |
64
|
|
|
|
|
|
|
Readonly our $HTTP_FORBIDDEN => 403; |
65
|
|
|
|
|
|
|
Readonly our $HTTP_NOT_FOUND => 404; |
66
|
|
|
|
|
|
|
Readonly our $HTTP_CONFLICT => 409; |
67
|
|
|
|
|
|
|
Readonly our $HTTP_MOVED_PERMANENTLY => 301; |
68
|
|
|
|
|
|
|
Readonly our $HTTP_FOUND => 302; |
69
|
|
|
|
|
|
|
Readonly our $HTTP_SEE_OTHER => 303; |
70
|
|
|
|
|
|
|
Readonly our $HTTP_NOT_MODIFIED => 304; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
73
|
|
|
|
|
|
|
chars => [ |
74
|
|
|
|
|
|
|
qw( |
75
|
|
|
|
|
|
|
$AMPERSAND |
76
|
|
|
|
|
|
|
$COLON |
77
|
|
|
|
|
|
|
$DOUBLE_COLON |
78
|
|
|
|
|
|
|
$DOT |
79
|
|
|
|
|
|
|
$COMMA |
80
|
|
|
|
|
|
|
$EMPTY |
81
|
|
|
|
|
|
|
$EQUAL_SIGN |
82
|
|
|
|
|
|
|
$QUESTION_MARK |
83
|
|
|
|
|
|
|
$SLASH |
84
|
|
|
|
|
|
|
) |
85
|
|
|
|
|
|
|
], |
86
|
|
|
|
|
|
|
booleans => [ |
87
|
|
|
|
|
|
|
qw( |
88
|
|
|
|
|
|
|
$TRUE |
89
|
|
|
|
|
|
|
$FALSE |
90
|
|
|
|
|
|
|
) |
91
|
|
|
|
|
|
|
], |
92
|
|
|
|
|
|
|
defaults => [ |
93
|
|
|
|
|
|
|
qw( |
94
|
|
|
|
|
|
|
$AMAZON_HEADER_PREFIX |
95
|
|
|
|
|
|
|
$METADATA_PREFIX |
96
|
|
|
|
|
|
|
$KEEP_ALIVE_CACHESIZE |
97
|
|
|
|
|
|
|
$DEFAULT_TIMEOUT |
98
|
|
|
|
|
|
|
$DEFAULT_BUFFER_SIZE |
99
|
|
|
|
|
|
|
$DEFAULT_LOG_LEVEL |
100
|
|
|
|
|
|
|
$DEFAULT_HOST |
101
|
|
|
|
|
|
|
$DEFAULT_REGION |
102
|
|
|
|
|
|
|
$MAX_BUCKET_NAME_LENGTH |
103
|
|
|
|
|
|
|
$MAX_DELETE_KEYS |
104
|
|
|
|
|
|
|
$MIN_BUCKET_NAME_LENGTH |
105
|
|
|
|
|
|
|
$MIN_MULTIPART_UPLOAD_CHUNK_SIZE |
106
|
|
|
|
|
|
|
$MAX_RETRIES |
107
|
|
|
|
|
|
|
) |
108
|
|
|
|
|
|
|
], |
109
|
|
|
|
|
|
|
misc => [ |
110
|
|
|
|
|
|
|
qw( |
111
|
|
|
|
|
|
|
$S3_XMLNS |
112
|
|
|
|
|
|
|
$XMLDECL |
113
|
|
|
|
|
|
|
%LIST_OBJECT_MARKERS |
114
|
|
|
|
|
|
|
%LOG_LEVELS |
115
|
|
|
|
|
|
|
$NOT_FOUND |
116
|
|
|
|
|
|
|
) |
117
|
|
|
|
|
|
|
], |
118
|
|
|
|
|
|
|
http => [ |
119
|
|
|
|
|
|
|
qw( |
120
|
|
|
|
|
|
|
$HTTP_BAD_REQUEST |
121
|
|
|
|
|
|
|
$HTTP_CONFLICT |
122
|
|
|
|
|
|
|
$HTTP_UNAUTHORIZED |
123
|
|
|
|
|
|
|
$HTTP_PAYMENT_RQUIRED |
124
|
|
|
|
|
|
|
$HTTP_FORBIDDEN |
125
|
|
|
|
|
|
|
$HTTP_NOT_FOUND |
126
|
|
|
|
|
|
|
$HTTP_MOVED_PERMANENTLY |
127
|
|
|
|
|
|
|
$HTTP_FOUND |
128
|
|
|
|
|
|
|
$HTTP_SEE_OTHER |
129
|
|
|
|
|
|
|
$HTTP_NOT_MODIFIED |
130
|
|
|
|
|
|
|
) |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
], |
133
|
|
|
|
|
|
|
); |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
our @EXPORT_OK = map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS; |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
$EXPORT_TAGS{all} = [@EXPORT_OK]; |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
1; |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
## no critic (RequirePodSections) |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
__END__ |