1 package Catalyst::IOC::LifeCycle::Request;
3 use namespace::autoclean;
4 with 'Bread::Board::LifeCycle';
10 my $instance = $self->$orig(@_);
13 # during setup in Catalyst.pm:
14 # - $class->setup_actions (line 3025)
15 # - $c->dispatcher->setup_actions (line 2271)
16 # - $c->components in Catalyst/Dispatcher.pm line 604
17 # which boils down to line 616 in Catalyst/IOC/Container.pm
18 # resolving the component _without_ the 'context' parameter.
19 # Should it get the context parameter? Should all calls to a
20 # ConstructorInjection service pass that parameter?
21 my $ctx = $self->param('ctx')
24 my $stash_key = "__Catalyst_IOC_LifeCycle_Request_" . $self->name;
25 return $ctx->stash->{$stash_key} ||= $instance;
36 Catalyst::IOC::LifeCycle::Request - Components that last for one request
46 Catalyst Contributors, see Catalyst.pm
50 This library is free software. You can redistribute it and/or modify it under
51 the same terms as Perl itself.