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