use Class::MOP;
use namespace::autoclean;
+# this is at least a little ghetto and not super well
+# thought out. Take a look at the following at some
+# point to clean it all up:
+#
+# http://search.cpan.org/~jjnapiork/MooseX-Role-BuildInstanceOf-0.06/lib/MooseX/Role/BuildInstanceOf.pm
+# http://github.com/rjbs/role-subsystem/blob/master/lib/Role/Subsystem.pm
+
parameter interface_role => (
isa => 'Str',
required => 1,
required => 1,
);
-parameter interface_role => (
- isa => 'Str',
- required => 1,
-);
-
parameter attributes_to_copy => (
isa => 'ArrayRef[Str]',
default => sub {[]},
my $meta = Class::MOP::class_of($class_name);
- has [map %{$_->clone}, map $meta->get_attribute($_), @{ $p->attributes_to_copy }];
+ has $_->name => %{ $_->clone }
+ for grep { $_ } map $meta->find_attribute_by_name($_), @{ $p->attributes_to_copy };
has $p->delegate_name => (
is => 'ro',