diff options
-rw-r--r-- | Changes | 9 | ||||
-rw-r--r-- | Makefile.PL | 2 | ||||
-rw-r--r-- | lib/Reaction/UI/Controller.pm | 15 |
3 files changed, 17 insertions, 9 deletions
@@ -1,4 +1,7 @@ -This file documents the revision history for Perl extension ComponentUI. +Revision history for Reaction +0.002000 + - Stop using ACCEPT_CONTEXT, use InstancePerContext instead + - up the dependency version on Devel::Declare to 003004 -0.01 2006-08-01 17:49:50 - - initial revision, generated by Catalyst +0.001001 - 12 Aug 2008 + - Initital public release diff --git a/Makefile.PL b/Makefile.PL index 282fd1d..993d0a0 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -34,7 +34,7 @@ requires 'Email::Send'; requires 'Email::MIME'; requires 'Email::MIME::Creator'; requires 'Text::CSV_XS'; -requires 'Devel::Declare' => '0.001006'; +requires 'Devel::Declare' => '0.003004'; requires 'MooseX::Types' => '0.04'; requires 'Scalar::Util'; requires 'File::ShareDir' => '1.00'; 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; |