aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/UI/Controller.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Reaction/UI/Controller.pm')
-rw-r--r--lib/Reaction/UI/Controller.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/Reaction/UI/Controller.pm b/lib/Reaction/UI/Controller.pm
index eac550d..45a85d8 100644
--- a/lib/Reaction/UI/Controller.pm
+++ b/lib/Reaction/UI/Controller.pm
@@ -1,15 +1,20 @@
package Reaction::UI::Controller;
-use base qw(
- Catalyst::Controller
- Catalyst::Component::ACCEPT_CONTEXT
- Reaction::Object
-);
+use base qw(Catalyst::Controller Reaction::Object);
use Reaction::Class;
use Scalar::Util 'weaken';
use namespace::clean -except => [ qw(meta) ];
+has context => (is => 'ro', isa => 'Object', weak_ref => 1);
+with 'Catalyst::Component::InstancePerContext';
+
+sub build_per_context_instance {
+ my ($self, $c, @args) = @_;
+ my $newself = $self->new($self->_application, {%$self, context => $c, @args});
+ return $newself;
+}
+
sub push_viewport {
my $self = shift;
my $c = $self->context;