X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=f80f8a12beb06f6f5f5d377f28a15e3e20b15c36;hp=26b7649685ee902144f5550a3dca51368766a982;hb=f8a54681762e3fa6b09dce9f44ba40f82cacc70a;hpb=2a787673114b4301db87cfccddcae82c8cf2791a diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 26b7649..f80f8a1 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -903,6 +903,21 @@ constructed: overrides => 'me', }); +It's common practice to use a Moose attribute +on the receiving component to access the config value. + + package MyApp::Model::Foo; + + use Moose; + + # this attr will receive 'baz' at construction time + has 'bar' => ( + is => 'rw', + isa => 'Str', + ); + +You can then get the value 'baz' by calling $c->model('Foo')->bar + =cut around config => sub { @@ -3183,6 +3198,8 @@ wreis: Wallace Reis Yuval Kogman, C +rainboxx: Matthias Dietrich, C + =head1 LICENSE This library is free software. You can redistribute it and/or modify it under