Skip to content

Commit

Permalink
more session and cookie examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 19, 2012
1 parent eda6012 commit eae5a00
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -683,8 +683,8 @@ implements the following new ones.
Access request cookie values and create new response cookies.
# Extract value from request cookie
my $foo = $c->cookie('foo')->value;
# Create response cookie with domain
$c->cookie(name => 'sebastian', {domain => 'mojolicio.us'});
=head2 C<finish>
Expand Down Expand Up @@ -943,6 +943,9 @@ that cookies are generally limited to 4096 bytes of data.
my $foo = $c->session->{foo};
delete $c->session->{foo};
# Delete whole session
$c->session(expires => 1);
=head2 C<signed_cookie>
my $value = $c->signed_cookie('foo');
Expand Down

0 comments on commit eae5a00

Please sign in to comment.