1package TestApp::Controller::Engine::Response::Cookies;
2
3use strict;
4use base 'Catalyst::Base';
5
6sub one : Local {
7    my ( $self, $c ) = @_;
8    $c->res->cookies->{catalyst} = { value => 'cool',     path => '/bah' };
9    $c->res->cookies->{cool}     = { value => 'catalyst', path => '/' };
10    $c->forward('TestApp::View::Dump::Request');
11}
12
13sub two : Local {
14    my ( $self, $c ) = @_;
15    $c->res->cookies->{catalyst} = { value => 'cool',     path => '/bah' };
16    $c->res->cookies->{cool}     = { value => 'catalyst', path => '/' };
17    $c->res->redirect('http://www.google.com/');
18}
19
20sub three : Local {
21    my ( $self, $c ) = @_;
22
23    $c->res->cookies->{object} = CGI::Simple::Cookie->new(
24        -name => "this_is_the_real_name",
25        -value => [qw/foo bar/],
26    );
27
28    $c->res->cookies->{hash} = {
29        value => [qw/a b c/],
30    };
31
32    $c->forward('TestApp::View::Dump::Request');
33}
34
351;
36