X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FRole.pm;h=f4bf289a0e48c3b0121ea17d1c5e264afdc8325e;hb=724c77c0fd7afe685c69dc1abcfc8b1a79eefae3;hp=9b4aec5c9320d0b2875bde8dbd52399af9184a5b;hpb=d16fe7d79e7f254ed479b58681d716e78b3e8caf;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Meta/Role.pm b/lib/Mouse/Meta/Role.pm index 9b4aec5..f4bf289 100644 --- a/lib/Mouse/Meta/Role.pm +++ b/lib/Mouse/Meta/Role.pm @@ -48,12 +48,11 @@ sub get_attribute { $_[0]->{attributes}->{$_[1]} } sub apply { my $self = shift; my $class = shift; - my $pkg = $class->name; for my $name ($self->get_attribute_list) { next if $class->has_attribute($name); my $spec = $self->get_attribute($name); - Mouse::Meta::Attribute->create($pkg, $name, %$spec); + Mouse::Meta::Attribute->create($class, $name, %$spec); } }