Applied doc patches that might help to figure out how to receive component's config...
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index 26b7649..f80f8a1 100644 (file)
@@ -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 <wallace@reis.org.br>
 
 Yuval Kogman, C<nothingmuch@woobling.org>
 
+rainboxx: Matthias Dietrich, C<perl@rainboxx.de>
+
 =head1 LICENSE
 
 This library is free software. You can redistribute it and/or modify it under