Amon2-Auth
view release on metacpan or search on metacpan
lib/Amon2/Auth/Util.pm view on Meta::CPAN
use warnings;
use utf8;
package Amon2::Auth::Util;
use parent qw(Exporter);
our @EXPORT_OK = qw(parse_content);
# taken from OAuth::Lite2::Util
use Hash::MultiValue;
use URI::Escape qw(uri_unescape);
sub parse_content {
my $content = shift;
my $params = Hash::MultiValue->new;
for my $pair ( split /\&/, $content ) {
my ( $key, $value ) = split /\=/, $pair;
$key = uri_unescape( $key || '' );
$value = uri_unescape( $value || '' );
$params->add( $key, $value );
}
return $params;
}
1;
( run in 0.273 second using v1.01-cache-2.11-cpan-c21f80fb71c )