From: Tomas Doran Date: Mon, 15 Nov 2010 18:46:05 +0000 (+0000) Subject: Clarify docs X-Git-Tag: 5.80030~25 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=cd121560a0d1545a97dd58436e57b678841cbc0a;hp=d44d2d8fc4e14e827edd55383a801f81c7ae87cf Clarify docs --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 3e298ec..f3bf321 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -925,12 +925,18 @@ on the receiving component to access the config value. use Moose; # this attr will receive 'baz' at construction time - has 'bar' => ( + has 'bar' => ( is => 'rw', isa => 'Str', ); You can then get the value 'baz' by calling $c->model('Foo')->bar +(or $self->bar inside code in the model). + +B you MUST NOT call C<< $self->config >> or C<< __PACKAGE__->config >> +as a way of reading config within your code, as this B give you the +correctly merged config back. You B take the config values supplied to +the constructor and use those instead. =cut