NAME
Orochi::Declare - Declarative Style Orochi DI
SYNOPSIS
use Orochi::Declare;
my $c = container {
inject_constructor '/myapp' => (
class => 'MyApp',
args => {
foo => bind_value '/myapp/foo',
}
);
inject_constructor '/myapp/foo' => (
class => 'MyApp::Foo',
args => {
bar => bind_value '/myapp/foo/bar'
}
);
inject_literal '/myapp/foo/bar' => 1;
}
my $myapp = $c->get('/myapp');