Navigation Menu

Skip to content

Commit

Permalink
replace multi-name examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 23, 2015
1 parent 2a758b2 commit a62e5df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/Mojo/Message/Request.pm
Expand Up @@ -401,9 +401,8 @@ Check C<X-Requested-With> header for C<XMLHttpRequest> value.
=head2 param
my @names = $req->param;
my $value = $req->param('foo');
my ($foo, $bar) = $req->param(['foo', 'bar']);
my @names = $req->param;
my $value = $req->param('foo');
Access C<GET> and C<POST> parameters extracted from the query string and
C<application/x-www-form-urlencoded> or C<multipart/form-data> message body.
Expand Down
4 changes: 3 additions & 1 deletion lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -455,7 +455,9 @@ L<Mojolicious::Plugin::DefaultHelpers/"reply-E<gt>not_found">.

get '/divide/:dividend/by/:divisor' => sub {
my $c = shift;
my ($dividend, $divisor) = $c->param(['dividend', 'divisor']);

my $dividend = $c->param('dividend');
my $divisor = $c->param('divisor');

# 404
return $c->reply->not_found
Expand Down

0 comments on commit a62e5df

Please sign in to comment.