Skip to content
Snippets Groups Projects
Commit 6107672b authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Added support for parseURIQuery

parent 83b02a35
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,6 @@ our (@ISA,@EXPORT,@EXPORT_OK); ...@@ -28,7 +28,6 @@ our (@ISA,@EXPORT,@EXPORT_OK);
@EXPORT = qw( @EXPORT = qw(
prettyUndef prettyUndef
toHex toHex
parseFormContent
isVariable isVariable
isUsername isUsername
isIP isIP
...@@ -37,6 +36,8 @@ our (@ISA,@EXPORT,@EXPORT_OK); ...@@ -37,6 +36,8 @@ our (@ISA,@EXPORT,@EXPORT_OK);
booleanize booleanize
); );
@EXPORT_OK = qw( @EXPORT_OK = qw(
parseFormContent
parseURIQuery
); );
...@@ -77,6 +78,22 @@ sub parseFormContent ...@@ -77,6 +78,22 @@ sub parseFormContent
return \%res; return \%res;
} }
# Parse query data
sub parseURIQuery
{
my $request = shift;
my %res;
use URI::QueryParam;
# Pull in URL params
foreach my $key ($request->uri->query_param) {
$res{$key} = $request->uri->query_param($key);
}
return \%res;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment