X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FRole.pm;h=2ea38e237658e7a07963b8e9246705e405f27102;hb=11d415286701d3b51e517cb6826138808967cb89;hp=709c3f957b1a36692e69820eb8a8735617797e8c;hpb=e82cf08d6ab36c4269c82cb2e066defee22a26d8;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Meta/Role.pm b/lib/Mouse/Meta/Role.pm index 709c3f9..2ea38e2 100644 --- a/lib/Mouse/Meta/Role.pm +++ b/lib/Mouse/Meta/Role.pm @@ -2,6 +2,8 @@ package Mouse::Meta::Role; use strict; use warnings; use Carp 'confess'; + +use Mouse::Meta::Attribute; use Mouse::Util qw(version authority identifier); do { @@ -49,7 +51,7 @@ sub add_attribute { my $self = shift; my $name = shift; my $spec = shift; - $self->{attributes}->{$name} = $spec; + $self->{attributes}->{$name} = Mouse::Meta::Attribute->new($name, %$spec); } sub has_attribute { exists $_[0]->{attributes}->{$_[1]} }