Skip to content

Commit

Permalink
show how to assign multiple values at once
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 17, 2015
1 parent 2976bac commit 6b853af
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Mojo.pm
Expand Up @@ -124,6 +124,9 @@ Application configuration.
# Remove value
my $foo = delete $app->config->{foo};
# Assign multiple values at once
$app->config(foo => 'test', bar => 23);
=head2 handler
$app->handler(Mojo::Transaction::HTTP->new);
Expand Down
3 changes: 3 additions & 0 deletions lib/Mojo/IOLoop/Delay.pm
Expand Up @@ -236,6 +236,9 @@ Data shared between all L</"steps">.
# Remove value
my $foo = delete $delay->data->{foo};
# Assign multiple values at once
$delay->data(foo => 'test', bar => 23);
=head2 pass
$delay = $delay->pass;
Expand Down
3 changes: 3 additions & 0 deletions lib/Mojolicious.pm
Expand Up @@ -563,6 +563,9 @@ request.
# Remove value
my $foo = delete $app->defaults->{foo};
# Assign multiple values at once
$app->defaults(foo => 'test', bar => 23);
=head2 dispatch
$app->dispatch(Mojolicious::Controller->new);
Expand Down
3 changes: 3 additions & 0 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -896,6 +896,9 @@ reserved for internal use.
# Remove value
my $foo = delete $c->stash->{foo};
# Assign multiple values at once
$c->stash(foo => 'test', bar => 23);
=head2 url_for
my $url = $c->url_for;
Expand Down

0 comments on commit 6b853af

Please sign in to comment.