diff options
Diffstat (limited to 'lib/Bot/Games/OO/Game.pm')
-rw-r--r-- | lib/Bot/Games/OO/Game.pm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/Bot/Games/OO/Game.pm b/lib/Bot/Games/OO/Game.pm index b95b33a..938af7c 100644 --- a/lib/Bot/Games/OO/Game.pm +++ b/lib/Bot/Games/OO/Game.pm @@ -8,7 +8,7 @@ sub command { my $superclass = Moose::blessed($method_meta) || 'Moose::Meta::Method'; my $method_metaclass = Moose::Meta::Class->create_anon_class( superclasses => [$superclass], - roles => ['Bot::Games::Meta::Role::Command'], + roles => ['Bot::Games::Meta::Role::Method::Command'], cache => 1, ); if ($method_meta) { @@ -22,7 +22,7 @@ sub command { ); $class->meta->add_method($name, $method_meta); } - for my $attr (Bot::Games::Meta::Role::Command->meta->get_attribute_list) { + for my $attr (Bot::Games::Meta::Role::Method::Command->meta->get_attribute_list) { $method_meta->$attr($args{$attr}) if exists $args{$attr}; } } @@ -37,9 +37,12 @@ sub init_meta { my %options = @_; Moose->init_meta(%options); Moose::Util::MetaRole::apply_metaclass_roles( - for_class => $options{for_class}, - attribute_metaclass_roles => ['Bot::Games::Meta::Role::Attribute'], - metaclass_roles => ['Bot::Games::Meta::Role::Class'], + for_class => + $options{for_class}, + attribute_metaclass_roles => + ['Bot::Games::Meta::Role::Attribute::Command'], + metaclass_roles => + ['Bot::Games::Meta::Role::Class::Command'], ); return $options{for_class}->meta; } |