by
0
3
161k
0
Top 1% !
Pearl of Wisdom
Specified
Popularity: 11550th place

Published on:

No tags for this snippet yet.
SourceGitHub
SourceMyGists

Mojolicious::Controller using CGI::Expand

Mojolicious::Controller using CGI::Expand: 
Perl: Mojolicious
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/563839/Mojolicious--Controller-using-CGI--Expan?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
use Mojo::Base 'Mojolicious'; use CGI::Expand; sub startup { my $self = shift; $self->hook(before_dispatch => sub { my $c = shift; my $hash = CGI::Expand->expand_hash($c->req->params->to_hash); $c->param($_ => $hash->{$_}) for keys %$hash; }); }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus