diff options
author | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-01-06 17:24:14 +0000 |
---|---|---|
committer | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-01-06 17:24:14 +0000 |
commit | d0736579d1a4ee339b799fcf3344a2fe9e9b2092 (patch) | |
tree | b801953c3ba907f32bd0b1a4266480c6366d02e2 /lib/Reaction/UI/Controller.pm | |
parent | 893bf4f1e774c47122cbc222d35ce1667d35d49f (diff) | |
download | reaction-d0736579d1a4ee339b799fcf3344a2fe9e9b2092.tar.gz reaction-d0736579d1a4ee339b799fcf3344a2fe9e9b2092.zip |
real Changes file, use InstancePerContext, up Devel::Declare dep
Diffstat (limited to 'lib/Reaction/UI/Controller.pm')
-rw-r--r-- | lib/Reaction/UI/Controller.pm | 15 |
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; |