Subject: | ->resolve() does not transport parameters to constructor |
Hi,
Maybe I am using things not as intended, but I do not see my parameters get transported into the
ConstructorInjection.
This is what I do somewhere inside my code:
return $container->resolve(
service => $service_name,
parameters => { @_ }, # @_ really contains something (!)
);
Bread::Board::Container, line 161 reads:
return $service->get( %parameters );
so, my parameters got collected before and are transported into the *Injection's get() method.
However, the get() method does not use any arguments beyond $self...
If I patch Bread::Board::ConstructorInjection line 37 from:
$self->class->$constructor( %{ $self->params } );
to:
$self->class->$constructor( %{ $self->params }, @_ );
I see my parameters appear in the constructor of my class instantiated. All other injection-Classes
also seem to ignore the parameters if I see things right.
Should I have done something differently or did I find a bug?
Best,
Wolfgang