moved setup_home to the container
[catagits/Catalyst-Runtime.git] / lib / Catalyst / IOC / SubContainer.pm
index ccbf007..28c59ff 100644 (file)
@@ -11,7 +11,7 @@ has default_component => (
     lazy     => 1,
 );
 
-sub _build_default_componentt {
+sub _build_default_component {
     my ( $self ) = @_;
 
     my @complist = $self->get_service_list;
@@ -21,11 +21,14 @@ sub _build_default_componentt {
 
 
 sub get_component {
-    my ( $self, $name, @args ) = @_;
+    my ( $self, $name, $ctx, @args ) = @_;
 
     return $self->resolve(
         service    => $name,
-        parameters => { accept_context_args => \@args },
+        parameters => {
+            accept_context_args => [ $ctx, @args ],
+            ctx => $ctx,
+        },
     );
 }