Commit 731cb711 authored by E. Choroba's avatar E. Choroba Committed by Karen Etheridge

Document that roles can modify BUILD

parent 6f0f0041
......@@ -113,7 +113,10 @@ do something with parameters that do not represent object attributes.
The interaction between multiple C<BUILD> methods in an inheritance hierarchy
is different from normal Perl methods. B<You should never call C<<
$self->SUPER::BUILD >>>, nor should you ever apply a method modifier to
C<BUILD>. Roles are an exception to this rule, though: it's completely
acceptable to apply a method modifier to C<BUILD> in a role; you can
even provide an empty C<BUILD> subroutine in a role so the role is applicable
even to classes without their own C<BUILD>.
Moose arranges to have all of the C<BUILD> methods in a hierarchy
called when an object is constructed, I<from parents to
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment