Rename Roles::Recipe1 to Roles::Comparable_CodeReuse
[gitmo/Moose.git] / lib / Moose / Cookbook / Roles / Recipe2.pod
index 7c77f68..096abfd 100644 (file)
@@ -1,9 +1,11 @@
+package Moose::Cookbook::Roles::Recipe2;
 
-=pod
+# ABSTRACT: Advanced Role Composition - method exclusion and aliasing
+
+__END__
 
-=head1 NAME
 
-Moose::Cookbook::Roles::Recipe2 - Advanced Role Composition - method exclusion and aliasing
+=pod
 
 =head1 SYNOPSIS
 
@@ -29,7 +31,8 @@ Moose::Cookbook::Roles::Recipe2 - Advanced Role Composition - method exclusion a
       -alias => {
           stop  => '_stop',
           start => '_start'
-      }
+      },
+      -excludes => [ 'stop', 'start' ],
   };
 
   sub stop {
@@ -81,11 +84,15 @@ original implementation. To do this, we alias the methods from
 C<Restartable> to private methods, and provide wrappers around the
 originals (1).
 
+Note that aliasing simply I<adds> 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<Restartable::ButBroken> role, we want to provide an entirely
@@ -118,19 +125,6 @@ using method modifiers, but for the sake of this example, we don't.
 
 =back
 
-=head1 AUTHOR
-
-Dave Rolsky E<lt>autarch@urth.orgE<gt>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 2006-2009 by Infinity Interactive, Inc.
-
-L<http://www.iinteractive.com>
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
 =begin testing
 
 {