diff options
author | edenc <edenc@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-12-04 21:35:06 +0000 |
---|---|---|
committer | edenc <edenc@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-12-04 21:35:06 +0000 |
commit | a722f3e3e226a7319f69722de01c06792b3cf2c3 (patch) | |
tree | e7e57f6dee76d239afaab1641515eef3ca48f154 /lib/Reaction/UI/Controller.pm | |
parent | 1fb2fe93587857afb8b3e4923a4ab726831033d3 (diff) | |
download | reaction-a722f3e3e226a7319f69722de01c06792b3cf2c3.tar.gz reaction-a722f3e3e226a7319f69722de01c06792b3cf2c3.zip |
fixed hash deref bug in the base controller
Diffstat (limited to 'lib/Reaction/UI/Controller.pm')
-rw-r--r-- | lib/Reaction/UI/Controller.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Reaction/UI/Controller.pm b/lib/Reaction/UI/Controller.pm index 2d1b843..f428941 100644 --- a/lib/Reaction/UI/Controller.pm +++ b/lib/Reaction/UI/Controller.pm @@ -12,7 +12,7 @@ with 'Catalyst::Component::InstancePerContext'; sub build_per_context_instance { my ($self, $c, @args) = @_; my $class = ref($self) || $self; - my $newself = $class->new($self->_application, {%$self, context => $c, @args}); + my $newself = $class->new($self->_application, {%{$self || {}}, context => $c, @args}); return $newself; } @@ -136,7 +136,7 @@ controller configuration. For example to override the default number of items in a CRUD list action: __PACKAGE__->config( - action => { + action => { list => { ViewPort => { per_page => 50 } }, } ); @@ -160,7 +160,7 @@ TODO: explain how next_action as a scalar gets converted to the redirect arrayre =head2 pop_viewport_to $vp Call L<Reaction::UI::FocusStack/pop_viewport> or -L<Reaction::UI::FocusStack/pop_viewport_to> on +L<Reaction::UI::FocusStack/pop_viewport_to> on the C<< $c->stash->{focus_stack} >>. =head2 redirect_to $c, $to, $captures, $args, $attrs @@ -186,7 +186,7 @@ $args if not supplied. =head2 make_context_closure The purpose of this method is to prevent memory leaks. -It weakens the context object, often denoted $c, and passes it as the +It weakens the context object, often denoted $c, and passes it as the first argument to the sub{} that is passed to the make_context_closure method. In other words, @@ -199,7 +199,7 @@ make_context_closure returns sub { $sub_you_gave_it->($weak_c, @_) To further expound up this useful construct consider code written before make_context_closure was created: - on_apply_callback => + on_apply_callback => sub { $self->after_search( $c, @_ ); } |