Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid a bunch of work when the role to role applier has an empty list…
… of roles to apply.
  • Loading branch information
jnthn committed Aug 8, 2011
1 parent b4296cb commit 38be712
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Perl6/Metamodel/RoleToRoleApplier.pm
@@ -1,5 +1,10 @@
my class RoleToRoleApplier {
method apply($target, @roles) {
# Ensure we actually have something to appply.
unless +@roles {
return [];
}

# Aggregate all of the methods sharing names, eliminating
# any duplicates (a method can't collide with itself).
my %meth_info;
Expand Down

0 comments on commit 38be712

Please sign in to comment.