my $component = $self->class;
my $params = $self->params;
my $config = $params->{config}->{ $self->config_key } || {};
+ # FIXME - Is depending on the application name to pass into constructors here a good idea?
+ # This makes app/ctx split harder I think.. Need to think more here, but I think
+ # we want to pass the application in as a parameter when building the service
+ # rather than depending on the app name, so that later, when the app becomes an instance
+ # then it'll get passed in, and components can stash themselves 'per app instance'
my $app_name = $params->{application_name};
# Stash catalyst_component_name in the config here, so that custom COMPONENT
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,
+ },
);
}