[Catalyst] cookies!

Jonathan Rockway jon at jrock.us
Wed Feb 13 04:51:28 GMT 2008


* On Tue, Feb 12 2008, Jennifer Ahn wrote:
> Toby Corkindale wrote:
>> To set cookies, use $c->response instead, like:
>> $c->response->cookies->{'newCookie'} = {
>>     value => '123',
>>     path => '/',
>>     domain => 'foobar.com',
>>     expires => '+8h',
>> };
>
> How did you instantiate the cookie in the beginning of the session?

Re-read the above.  $c->res->cookies is a hash.  You put stuff in there
and Catalyst will take care of the rest.

If you want sessions instead of just a value in a cookie, then look at
the Catalyst::Plugin::Session framework.

Finally, it's extremely difficult to reply to your messages when you
top-post.  Most people's mail clients can't auto-fix that and as a
result they won't bother replying to you.  Just FYI.

Regards,
Jonathan Rockway



More information about the Catalyst mailing list