initial import of catalyst.
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Response.pm
1 package Catalyst::Response;
2
3 use strict;
4 use base 'Class::Accessor::Fast';
5
6 __PACKAGE__->mk_accessors(qw/cookies headers output redirect status/);
7
8 =head1 NAME
9
10 Catalyst::Response - Catalyst Response Class
11
12 =head1 SYNOPSIS
13
14 See L<Catalyst::Application>.
15
16 =head1 DESCRIPTION
17
18 The Catalyst Response.
19
20 =head2 METHODS
21
22 =head3 cookies
23
24 Returns a hashref containing the cookies.
25
26     $c->response->cookies->{foo} = { value => '123' };
27
28 =head3 headers
29
30 Returns a L<HTTP::Headers> object containing the headers.
31
32     $c->response->headers->header( 'X-Catalyst' => $Catalyst::VERSION );
33
34 =head3 output
35
36 Contains the final output.
37
38     $c->response->output('Catalyst rockz!');
39
40 =head3 redirect
41
42 Contains a location to redirect to.
43
44     $c->response->redirect('http://slashdot.org');
45
46 =head3 status
47
48 Contains the HTTP status.
49
50     $c->response->status(404);
51
52 =head1 AUTHOR
53
54 Sebastian Riedel, C<sri@cpan.org>
55
56 =head1 COPYRIGHT
57
58 This program is free software, you can redistribute it and/or modify it under
59 the same terms as Perl itself.
60
61 =cut
62
63 1;