use strict;
use warnings;
use Carp 'confess';
+
+use Mouse::Meta::Attribute;
use Mouse::Util qw(version authority identifier);
do {
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]} }
# XXX what's Moose's behavior?
#next;
} else {
- *$class_function = *$role_function;
+ *{$class_function} = \&{$role_function};
}
if ($args{alias} && $args{alias}->{$name}) {
my $dstname = $args{alias}->{$name};