added documtentation for attributes overloading
[gitmo/Moo.git] / lib / Moo.pm
index a6c6fc1..42da790 100644 (file)
@@ -165,7 +165,7 @@ sub _constructor_maker_for {
         construction_string => (
           $moo_constructor
             ? ($con ? $con->construction_string : undef)
-            : ('$class->'.$target.'::SUPER::new(@_)')
+            : ('$class->'.$target.'::SUPER::new($class->can(q[FOREIGNBUILDARGS]) ? $class->FOREIGNBUILDARGS(@_) : @_)')
         ),
         subconstructor_handler => (
           '      if ($Moo::MAKERS{$class}) {'."\n"
@@ -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<has> are as follows:
 
 =over 2
@@ -781,8 +790,18 @@ to Moo by providing a more Moose-like interface.
 
 Users' IRC: #moose on irc.perl.org
 
+=for html <a href="http://chat.mibbit.com/#moose@irc.perl.org">(click for instant chatroom login)</a>
+
 Development and contribution IRC: #web-simple on irc.perl.org
 
+=for html <a href="http://chat.mibbit.com/#web-simple@irc.perl.org">(click for instant chatroom login)</a>
+
+Bugtracker: L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Moo>
+
+Git repository: L<git://git.shadowcat.co.uk/gitmo/Moo.git>
+
+Git web access: L<http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/Moo.git>
+
 =head1 AUTHOR
 
 mst - Matt S. Trout (cpan:MSTROUT) <mst@shadowcat.co.uk>
@@ -825,6 +844,6 @@ as listed above.
 =head1 LICENSE
 
 This library is free software and may be distributed under the same terms
-as perl itself.
+as perl itself. See L<http://dev.perl.org/licenses/>.
 
 =cut