| line | stmt | bran | cond | sub | pod | time | code | 
| 1 | 1 |  |  | 1 |  | 4 | use strict; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 32 |  | 
| 2 | 1 |  |  | 1 |  | 4 | use warnings; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 27 |  | 
| 3 | 1 |  |  | 1 |  | 11 | use utf8; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 5 |  | 
| 4 |  |  |  |  |  |  |  | 
| 5 |  |  |  |  |  |  | package Amon2::Auth::Util; | 
| 6 | 1 |  |  | 1 |  | 465 | use parent qw(Exporter); | 
|  | 1 |  |  |  |  | 237 |  | 
|  | 1 |  |  |  |  | 4 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | our @EXPORT_OK = qw(parse_content); | 
| 9 |  |  |  |  |  |  |  | 
| 10 |  |  |  |  |  |  | # taken from OAuth::Lite2::Util | 
| 11 | 1 |  |  | 1 |  | 515 | use Hash::MultiValue; | 
|  | 1 |  |  |  |  | 1792 |  | 
|  | 1 |  |  |  |  | 28 |  | 
| 12 | 1 |  |  | 1 |  | 5 | use URI::Escape qw(uri_unescape); | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 152 |  | 
| 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; |