more typo fixes
[gitmo/Moose.git] / lib / Moose / Meta / Role / Application / ToRole.pm
index a5be896..6b7e811 100644 (file)
@@ -6,7 +6,7 @@ use metaclass;
 
 use Scalar::Util    'blessed';
 
-our $VERSION   = '0.59';
+our $VERSION   = '0.67';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -66,8 +66,6 @@ sub apply_attributes {
 sub apply_methods {
     my ($self, $role1, $role2) = @_;
     foreach my $method_name ($role1->get_method_list) {
-        
-        next if $self->is_method_excluded($method_name);        
 
         if ($self->is_method_aliased($method_name)) {
             my $aliased_method_name = $self->get_method_aliases->{$method_name};
@@ -84,11 +82,14 @@ sub apply_methods {
             );
 
             if (!$role2->has_method($method_name)) {
-                $role2->add_required_methods($method_name);
+                $role2->add_required_methods($method_name)
+                    unless $self->is_method_excluded($method_name);
             }
 
             next;
-        }        
+        }     
+        
+        next if $self->is_method_excluded($method_name);           
         
         # it if it has one already
         if ($role2->has_method($method_name) &&
@@ -99,7 +100,7 @@ sub apply_methods {
             $role2->add_required_methods($method_name);
         }
         else {
-            # add it, although it could be overriden
+            # add it, although it could be overridden
             $role2->add_method(
                 $method_name,
                 $role1->get_method($method_name)
@@ -117,7 +118,7 @@ sub apply_override_method_modifiers {
         if ($role2->has_method($method_name)) {
             # if it is being composed into another role
             # we have a conflict here, because you cannot
-            # combine an overriden method with a locally
+            # combine an overridden method with a locally
             # defined one
             Moose->throw_error("Role '" . $role1->name . "' has encountered an 'override' method conflict " .
                     "during composition (A local method of the same name as been found). This " .
@@ -208,7 +209,7 @@ Stevan Little E<lt>stevan@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2008 by Infinity Interactive, Inc.
+Copyright 2006-2009 by Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>