1 package Catalyst::Context;
5 BEGIN { require 5.008004; }
7 has action => (is => 'rw');
8 has counter => (is => 'rw', default => sub { {} });
9 has namespace => (is => 'rw');
10 has request_class => (is => 'ro', default => 'Catalyst::Request');
11 has request => (is => 'rw', default => sub { $_[0]->request_class->new({}) }, required => 1, lazy => 1);
12 has response_class => (is => 'ro', default => 'Catalyst::Response');
13 has response => (is => 'rw', default => sub { $_[0]->response_class->new({}) }, required => 1, lazy => 1);
14 has stack => (is => 'ro', default => sub { [] });
15 has stash => (is => 'rw', default => sub { {} });
16 has state => (is => 'rw', default => 0);
17 has stats => (is => 'rw');
19 # Remember to update this in Catalyst::Runtime as well!
21 our $VERSION = '5.80013';
24 my $dev_version = $VERSION =~ /_\d{2}$/;
25 *_IS_DEVELOPMENT_VERSION = sub () { $dev_version };
28 $VERSION = eval $VERSION;
32 __PACKAGE__->meta->make_immutable;
40 Catalyst::Context - object for keeping request related state
68 L<Catalyst>, L<Catalyst::Model>, L<Catalyst::View>, L<Catalyst::Controller>.
72 Catalyst Contributors, see Catalyst.pm
76 This library is free software. You can redistribute it and/or modify it under
77 the same terms as Perl itself.