| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
4
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
23
|
|
|
2
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
16
|
|
|
3
|
1
|
|
|
1
|
|
3
|
use utf8; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
3
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Amon2::Auth::Util; |
|
6
|
1
|
|
|
1
|
|
23
|
use parent qw(Exporter); |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
4
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our @EXPORT_OK = qw(parse_content); |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# taken from OAuth::Lite2::Util |
|
11
|
1
|
|
|
1
|
|
456
|
use Hash::MultiValue; |
|
|
1
|
|
|
|
|
1599
|
|
|
|
1
|
|
|
|
|
25
|
|
|
12
|
1
|
|
|
1
|
|
6
|
use URI::Escape qw(uri_unescape); |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
138
|
|
|
13
|
|
|
|
|
|
|
sub parse_content { |
|
14
|
0
|
|
|
0
|
0
|
|
my $content = shift; |
|
15
|
0
|
|
|
|
|
|
my $params = Hash::MultiValue->new; |
|
16
|
0
|
|
|
|
|
|
for my $pair ( split /\&/, $content ) { |
|
17
|
0
|
|
|
|
|
|
my ( $key, $value ) = split /\=/, $pair; |
|
18
|
0
|
|
0
|
|
|
|
$key = uri_unescape( $key || '' ); |
|
19
|
0
|
|
0
|
|
|
|
$value = uri_unescape( $value || '' ); |
|
20
|
0
|
|
|
|
|
|
$params->add( $key, $value ); |
|
21
|
|
|
|
|
|
|
} |
|
22
|
0
|
|
|
|
|
|
return $params; |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |