line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::OpenStack::Swift::Util; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
87161
|
use strict; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
166
|
|
4
|
6
|
|
|
6
|
|
31
|
use warnings; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
166
|
|
5
|
6
|
|
|
6
|
|
1698
|
use Encode; |
|
6
|
|
|
|
|
38295
|
|
|
6
|
|
|
|
|
467
|
|
6
|
6
|
|
|
6
|
|
1546
|
use URI::Escape qw//; |
|
6
|
|
|
|
|
6945
|
|
|
6
|
|
|
|
|
130
|
|
7
|
6
|
|
|
6
|
|
1599
|
use Log::Minimal qw//; |
|
6
|
|
|
|
|
93644
|
|
|
6
|
|
|
|
|
171
|
|
8
|
6
|
|
|
6
|
|
50
|
use Exporter 'import'; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
929
|
|
9
|
|
|
|
|
|
|
our @EXPORT_OK = qw(uri_escape uri_unescape debugf); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub uri_escape { |
13
|
5
|
|
|
5
|
0
|
982
|
my $value = shift; |
14
|
5
|
100
|
|
|
|
20
|
if (utf8::is_utf8($value)) { |
15
|
1
|
|
|
|
|
5
|
return URI::Escape::uri_escape_utf8($value); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
else { |
18
|
4
|
|
|
|
|
20
|
return URI::Escape::uri_escape($value); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub uri_unescape { |
23
|
2
|
|
|
2
|
0
|
126
|
my $value = shift; |
24
|
2
|
|
|
|
|
5
|
return URI::Escape::uri_unescape($value); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub debugf { |
28
|
12
|
|
|
12
|
0
|
259
|
my ($message, $value) = @_; |
29
|
12
|
|
|
|
|
22
|
local $Log::Minimal::TRACE_LEVEL = 1; |
30
|
12
|
|
|
|
|
24
|
local $Log::Minimal::AUTODUMP = 1; |
31
|
12
|
|
|
|
|
39
|
Log::Minimal::debugf($message, $value); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |