line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::OpenStack::Swift::Util; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
80374
|
use strict; |
|
6
|
|
|
|
|
31
|
|
|
6
|
|
|
|
|
210
|
|
4
|
6
|
|
|
6
|
|
42
|
use warnings; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
194
|
|
5
|
6
|
|
|
6
|
|
2048
|
use Encode; |
|
6
|
|
|
|
|
55643
|
|
|
6
|
|
|
|
|
629
|
|
6
|
6
|
|
|
6
|
|
2288
|
use URI::Escape qw//; |
|
6
|
|
|
|
|
10815
|
|
|
6
|
|
|
|
|
219
|
|
7
|
6
|
|
|
6
|
|
2409
|
use Log::Minimal qw//; |
|
6
|
|
|
|
|
130599
|
|
|
6
|
|
|
|
|
243
|
|
8
|
6
|
|
|
6
|
|
68
|
use Exporter 'import'; |
|
6
|
|
|
|
|
20
|
|
|
6
|
|
|
|
|
1350
|
|
9
|
|
|
|
|
|
|
our @EXPORT_OK = qw(uri_escape uri_unescape debugf); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub uri_escape { |
13
|
5
|
|
|
5
|
0
|
1295
|
my $value = shift; |
14
|
5
|
100
|
|
|
|
32
|
if (utf8::is_utf8($value)) { |
15
|
1
|
|
|
|
|
8
|
return URI::Escape::uri_escape_utf8($value); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
else { |
18
|
4
|
|
|
|
|
29
|
return URI::Escape::uri_escape($value); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub uri_unescape { |
23
|
2
|
|
|
2
|
0
|
171
|
my $value = shift; |
24
|
2
|
|
|
|
|
45
|
return URI::Escape::uri_unescape($value); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub debugf { |
28
|
12
|
|
|
12
|
0
|
208
|
my ($message, $value) = @_; |
29
|
12
|
|
|
|
|
24
|
local $Log::Minimal::TRACE_LEVEL = 1; |
30
|
12
|
|
|
|
|
22
|
local $Log::Minimal::AUTODUMP = 1; |
31
|
12
|
|
|
|
|
42
|
Log::Minimal::debugf($message, $value); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |