From: Dave Rolsky Date: Fri, 11 Sep 2009 02:32:21 +0000 (-0500) Subject: We need to exclude the methods we alias in Restartable::ButUnreliable X-Git-Tag: 0.89_02~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0d412f7aab9cc3dad669b271d381467f47b81671;p=gitmo%2FMoose.git We need to exclude the methods we alias in Restartable::ButUnreliable --- diff --git a/lib/Moose/Cookbook/Roles/Recipe2.pod b/lib/Moose/Cookbook/Roles/Recipe2.pod index 7c77f68..366d7e1 100644 --- a/lib/Moose/Cookbook/Roles/Recipe2.pod +++ b/lib/Moose/Cookbook/Roles/Recipe2.pod @@ -29,7 +29,8 @@ Moose::Cookbook::Roles::Recipe2 - Advanced Role Composition - method exclusion a -alias => { stop => '_stop', start => '_start' - } + }, + -excludes => [ 'stop', 'start' ], }; sub stop { @@ -81,11 +82,15 @@ original implementation. To do this, we alias the methods from C to private methods, and provide wrappers around the originals (1). +Note that aliasing simply I a name, so we also need to exclude the +methods with their original names. + with 'Restartable' => { -alias => { stop => '_stop', start => '_start' - } + }, + -excludes => [ 'stop', 'start' ], }; In the C role, we want to provide an entirely