On Thu, Apr 6, 2017 at 11:24 AM, iaw4 <[email protected]> wrote:

> the Mojo way to read unique and simple GET parameters:
>

Even easier, you might just want Mojolicious::Controller's param method
<http://mojolicious.org/perldoc/Mojolicious/Controller#param>.

get '/' => sub {
  my $c = shift;
  my $x = $c->*param*('x'); # See Controller's param
<http://mojolicious.org/perldoc/Mojolicious/Controller#param>
  $c->app->log->warn($x);
  $c->render(inline => '<%= *param* "x" %>'); # See DefaultHelper's param
<http://mojolicious.org/perldoc/Mojolicious/Plugin/DefaultHelpers#param>
};

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to