Commit e6060adf authored by Karen Etheridge's avatar Karen Etheridge

Merge branch 'pull/164': Document that roles can modify BUILD

parents 6f0f0041 731cb711
......@@ -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>.
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