From: Damien Krotkine Date: Wed, 27 Feb 2013 14:19:50 +0000 (+0100) Subject: added documtentation for attributes overloading X-Git-Tag: v1.001000~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d56136b93ea8e247f07e03e231c30b2cc91acaa5;p=gitmo%2FMoo.git added documtentation for attributes overloading --- diff --git a/lib/Moo.pm b/lib/Moo.pm index 7815fdd..42da790 100644 --- a/lib/Moo.pm +++ b/lib/Moo.pm @@ -415,6 +415,15 @@ class. An error will be raised if these roles have conflicting methods. Declares an attribute for the class. + package Bar; + extends 'Foo'; # Foo has an 'attr' attribute + + has '+attr' => ( + default => sub { "blah" }, + ); + +Using the C<+> notation, it's possible to override an attribute. + The options for C are as follows: =over 2