Commit | Line | Data |
54642e5a |
1 | package Catalyst::Context; |
2 | |
3 | use Moose; |
4 | |
54642e5a |
5 | has action => (is => 'rw'); |
6 | has counter => (is => 'rw', default => sub { {} }); |
7 | has namespace => (is => 'rw'); |
8 | has request_class => (is => 'ro', default => 'Catalyst::Request'); |
9 | has request => (is => 'rw', default => sub { $_[0]->request_class->new({}) }, required => 1, lazy => 1); |
10 | has response_class => (is => 'ro', default => 'Catalyst::Response'); |
11 | has response => (is => 'rw', default => sub { $_[0]->response_class->new({}) }, required => 1, lazy => 1); |
12 | has stack => (is => 'ro', default => sub { [] }); |
13 | has stash => (is => 'rw', default => sub { {} }); |
14 | has state => (is => 'rw', default => 0); |
15 | has stats => (is => 'rw'); |
16 | |
54642e5a |
17 | no Moose; |
18 | |
19 | __PACKAGE__->meta->make_immutable; |
20 | |
21 | 1; |
22 | |
23 | __END__ |
24 | |
25 | =head1 NAME |
26 | |
27 | Catalyst::Context - object for keeping request related state |
28 | |
29 | =head1 ATTRIBUTES |
30 | |
31 | =head3 action |
32 | |
33 | =head3 counter |
34 | |
35 | =head3 namespace |
36 | |
37 | =head3 request_class |
38 | |
39 | =head3 request |
40 | |
41 | =head3 response_class |
42 | |
43 | =head3 response |
44 | |
45 | =head3 stack |
46 | |
47 | =head3 stash |
48 | |
49 | =head3 state |
50 | |
51 | =head3 stats |
52 | |
53 | =head1 SEE ALSO |
54 | |
55 | L<Catalyst>, L<Catalyst::Model>, L<Catalyst::View>, L<Catalyst::Controller>. |
56 | |
57 | =head1 AUTHORS |
58 | |
59 | Catalyst Contributors, see Catalyst.pm |
60 | |
61 | =head1 COPYRIGHT |
62 | |
63 | This library is free software. You can redistribute it and/or modify it under |
64 | the same terms as Perl itself. |
65 | |
66 | =cut |
67 | |