line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::OpenStack::Swift::Util; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
59645
|
use strict; |
|
6
|
|
|
|
|
21
|
|
|
6
|
|
|
|
|
143
|
|
4
|
6
|
|
|
6
|
|
23
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
119
|
|
5
|
6
|
|
|
6
|
|
2340
|
use Encode; |
|
6
|
|
|
|
|
40388
|
|
|
6
|
|
|
|
|
421
|
|
6
|
6
|
|
|
6
|
|
2129
|
use URI::Escape qw//; |
|
6
|
|
|
|
|
6821
|
|
|
6
|
|
|
|
|
121
|
|
7
|
6
|
|
|
6
|
|
2265
|
use Log::Minimal qw//; |
|
6
|
|
|
|
|
89022
|
|
|
6
|
|
|
|
|
150
|
|
8
|
6
|
|
|
6
|
|
38
|
use Exporter 'import'; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
846
|
|
9
|
|
|
|
|
|
|
our @EXPORT_OK = qw(uri_escape uri_unescape debugf); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub uri_escape { |
13
|
5
|
|
|
5
|
0
|
844
|
my $value = shift; |
14
|
5
|
100
|
|
|
|
19
|
if (utf8::is_utf8($value)) { |
15
|
1
|
|
|
|
|
5
|
return URI::Escape::uri_escape_utf8($value); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
else { |
18
|
4
|
|
|
|
|
17
|
return URI::Escape::uri_escape($value); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub uri_unescape { |
23
|
2
|
|
|
2
|
0
|
111
|
my $value = shift; |
24
|
2
|
|
|
|
|
5
|
return URI::Escape::uri_unescape($value); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub debugf { |
28
|
12
|
|
|
12
|
0
|
148
|
my ($message, $value) = @_; |
29
|
12
|
|
|
|
|
19
|
local $Log::Minimal::TRACE_LEVEL = 1; |
30
|
12
|
|
|
|
|
17
|
local $Log::Minimal::AUTODUMP = 1; |
31
|
12
|
|
|
|
|
27
|
Log::Minimal::debugf($message, $value); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |