diff options
author | matthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-01-07 15:48:25 +0000 |
---|---|---|
committer | matthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-01-07 15:48:25 +0000 |
commit | 1810d30231d48a745bab3931c18044bc19c85e61 (patch) | |
tree | 1bf68006c63547eefb0e17dc7bda3b51916e1407 /lib/Reaction/UI/Controller.pm | |
parent | 9964b409a3ceaf45a9e07dd0f6a3d77d13ae3f1d (diff) | |
download | reaction-1810d30231d48a745bab3931c18044bc19c85e61.tar.gz reaction-1810d30231d48a745bab3931c18044bc19c85e61.zip |
squelch a warning in Reaction::Class, port from BindLex to Component::ACCEPT_CONTEXT
Diffstat (limited to 'lib/Reaction/UI/Controller.pm')
-rw-r--r-- | lib/Reaction/UI/Controller.pm | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/Reaction/UI/Controller.pm b/lib/Reaction/UI/Controller.pm index e0e1423..fa9290f 100644 --- a/lib/Reaction/UI/Controller.pm +++ b/lib/Reaction/UI/Controller.pm @@ -1,14 +1,19 @@ package Reaction::UI::Controller; -use base qw/Catalyst::Controller::BindLex Reaction::Object/; +use base qw( + Catalyst::Controller + Catalyst::Component::ACCEPT_CONTEXT + Reaction::Object +); + use Reaction::Class; sub push_viewport { my $self = shift; - my $focus_stack :Stashed; + my $c = $self->context; + my $focus_stack = $c->stash->{focus_stack}; my ($class, @proto_args) = @_; my %args; - my $c = Catalyst::Controller::BindLex::_get_c_obj(4); if (my $vp_attr = $c->stack->[-1]->attributes->{ViewPort}) { if (ref($vp_attr) eq 'ARRAY') { $vp_attr = $vp_attr->[0]; @@ -35,14 +40,12 @@ sub push_viewport { } sub pop_viewport { - my $focus_stack :Stashed; - return $focus_stack->pop_viewport; + return shift->context->stash->{focus_stack}->pop_viewport; } sub pop_viewports_to { my ($self, $vp) = @_; - my $focus_stack :Stashed; - return $focus_stack->pop_viewports_to($vp); + return $self->context->stash->{focus_stack}->pop_viewports_to($vp); } sub redirect_to { |