non destructive config merge
groditi [Tue, 6 May 2008 01:07:53 +0000 (01:07 +0000)]
lib/Reaction/UI/Controller/Collection.pm

index 265ff79..b36d799 100644 (file)
@@ -63,12 +63,13 @@ sub view :Chained('object') :Args(0) {
 sub basic_page {
   my ($self, $c, $vp_args) = @_;
   my $action_name = $c->stack->[-1]->name;
-  return $self->push_viewport
+  my $vp = $self->action_viewport_map->{$action_name},
+  my $args = $self->merge_config_hashes
     (
-     $self->action_viewport_map->{$action_name},
-     %{ $vp_args || {} },
-     %{ $self->action_viewport_args->{$action_name} || {} },
+     $vp_args || {},
+     $self->action_viewport_args->{$action_name} || {} ,
     );
+  return $self->push_viewport($vp, %$args);
 }
 
 1;