X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDelta.pod;h=76d8cf7866bb96f75be7bcbf0ea862a2928ea433;hp=e965025ef195d4bbfbd3be648cdbd74fca4018ab;hb=044e7667c0cb0cd8dac8b33df1d503abdab0d70c;hpb=067a21ea868757ad0d3ea1d4e80f74d61e0698fc diff --git a/lib/Catalyst/Delta.pod b/lib/Catalyst/Delta.pod index e965025..76d8cf7 100755 --- a/lib/Catalyst/Delta.pod +++ b/lib/Catalyst/Delta.pod @@ -29,6 +29,31 @@ See L for more. L has a new method 'inject_component' which works the same as the method of the same name in L. +=head2 inject_components + +New configuration key allows you to inject components directly into your application without +any subclasses. For example: + + MyApp->config({ + inject_components => { + 'Controller::Err' => { from_component => 'Local::Controller::Errors' }, + 'Model::Zoo' => { from_component => 'Local::Model::Foo' }, + 'Model::Foo' => { from_component => 'Local::Model::Foo', roles => ['TestRole'] }, + }, + 'Controller::Err' => { a => 100, b=>200, namespace=>'error' }, + 'Model::Zoo' => { a => 2 }, + 'Model::Foo' => { a => 100 }, + }); + +Injected components are useful to reduce the ammount of nearly empty boilerplate classes +you might have, particularly when first starting an application. + +=head2 Component setup changes. + +Previously you could not depend on an application scoped component doing setup_components +since components were setup 'in order'. Now all components are first registered and then +setup, so you can now reliably use any component doing setup_components. + =head2 VERSION 5.90080+ The biggest change in this release is that UTF8 encoding is now enabled by