From: Dave Rolsky Date: Tue, 21 Feb 2012 17:25:03 +0000 (-0600) Subject: Add note about applying the same role >1 time being a no-op to Delta X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8431e13b8658a1353023927acac8870044ad0f5f;p=gitmo%2FMoose.git Add note about applying the same role >1 time being a no-op to Delta --- diff --git a/lib/Moose/Manual/Delta.pod b/lib/Moose/Manual/Delta.pod index 0420a80..7ac1ad7 100644 --- a/lib/Moose/Manual/Delta.pod +++ b/lib/Moose/Manual/Delta.pod @@ -29,6 +29,19 @@ We've given them all descriptive names, rather than numbers. This makes it easier to talk about them, and eliminates the need to renumber recipes in order to reorder them or delete one. +=item Applying the same role more than once is a no-op + +In previous versions of Moose, applying the same role more than once actually +went through the whole role application algorithm each time. This was mostly a +no-op, but it had a few side effects. First, if you looked at the role objects +for a metaclass (or role), you'd see the same role object more than +once. Second, method modifiers would be applied multiple times. + +Now, if you try to apply the same role twice, it is a real no-op. Note that +"same" is based on the Moose::Meta::Role object itself, not the role's +name. This means you can apply multiple instances of a +L role if you want. + =back =head1 2.0300