Navigation Menu

Skip to content

Commit

Permalink
better cookie example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 2, 2013
1 parent 7851e9b commit 063eb19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -547,8 +547,8 @@ implements the following new ones.
Access request cookie values and create new response cookies.
# Create response cookie with domain
$c->cookie(name => 'sebastian', {domain => 'mojolicio.us'});
# Create response cookie with domain and expiration date
$c->cookie(user => 'sri', {domain => 'mojolicio.us', expires => time + 60});
=head2 C<finish>
Expand Down
4 changes: 2 additions & 2 deletions t/mojolicious/group_lite_app.t
Expand Up @@ -64,8 +64,8 @@ get '/param_auth/too' =>
under sub {
my $self = shift;
$self->stash(_name => 'stash');
$self->cookie(foo => 'cookie', {expires => (time + 60)});
$self->signed_cookie(bar => 'signed_cookie', {expires => (time + 120)});
$self->cookie(foo => 'cookie', {expires => time + 60});
$self->signed_cookie(bar => 'signed_cookie', {expires => time + 120});
$self->cookie(bad => 'bad_cookie--12345678');
1;
};
Expand Down

0 comments on commit 063eb19

Please sign in to comment.