blob: 8aee3a40354b3875c56305628df12c6a840e1d6a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package Bot::Games::OO::Game::Role;
use Bot::Games::OO::Role ();
# XXX: is there a better way to go about this?
*command = \&Bot::Games::OO::Game::command;
Moose::Exporter->setup_import_methods(
with_caller => ['command'],
also => ['Bot::Games::OO::Role'],
);
sub init_meta {
shift;
my %options = @_;
Moose::Role->init_meta(%options);
Moose::Util::MetaRole::apply_metaclass_roles(
for_class =>
$options{for_class},
attribute_metaclass_roles =>
['Bot::Games::Trait::Attribute::Command',
'Bot::Games::Trait::Attribute::Formatted'],
metaclass_roles =>
['Bot::Games::Trait::Class::Command',
'Bot::Games::Trait::Class::Formatted'],
);
return $options{for_class}->meta;
}
1;
|