X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FRole%2FApplication%2FToClass.pm;h=b75a263ef0770b25e40fb9f1d49b1a08fc7bd6a3;hb=f5b6d42ece9d80050d0ce821d34a97ad7ad3582e;hp=d578d72244fe1b5989a62144a485ad6c029def3e;hpb=3302027128866dbbbd85044de953ac2fe9e4adfa;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Role/Application/ToClass.pm b/lib/Moose/Meta/Role/Application/ToClass.pm index d578d72..b75a263 100644 --- a/lib/Moose/Meta/Role/Application/ToClass.pm +++ b/lib/Moose/Meta/Role/Application/ToClass.pm @@ -100,20 +100,20 @@ sub apply_methods { my ($self, $role, $class) = @_; foreach my $method_name ($role->get_method_list) { - next if $self->is_method_excluded($method_name); - - # it if it has one already - if ($class->has_method($method_name) && - # and if they are not the same thing ... - $class->get_method($method_name)->body != $role->get_method($method_name)->body) { - next; - } - else { - # add it, although it could be overriden - $class->add_method( - $method_name, - $role->get_method($method_name) - ); + unless ($self->is_method_excluded($method_name)) { + # it if it has one already + if ($class->has_method($method_name) && + # and if they are not the same thing ... + $class->get_method($method_name)->body != $role->get_method($method_name)->body) { + next; + } + else { + # add it, although it could be overriden + $class->add_method( + $method_name, + $role->get_method($method_name) + ); + } } if ($self->is_method_aliased($method_name)) {