[Catalyst-commits] r13693 - Catalyst-Runtime/5.80/trunk/lib

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Mon Nov 15 18:46:05 GMT 2010


Author: t0m
Date: 2010-11-15 18:46:05 +0000 (Mon, 15 Nov 2010)
New Revision: 13693

Modified:
   Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
Log:
Clarify docs

Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm	2010-11-09 18:49:01 UTC (rev 13692)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm	2010-11-15 18:46:05 UTC (rev 13693)
@@ -925,13 +925,19 @@
     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<NOTE:> you MUST NOT call C<< $self->config >> or C<< __PACKAGE__->config >>
+as a way of reading config within your code, as this B<will not> give you the
+correctly merged config back. You B<MUST> take the config values supplied to
+the constructor and use those instead.
+
 =cut
 
 around config => sub {




More information about the Catalyst-commits mailing list