summaryrefslogtreecommitdiffstats
path: root/lib/Bot/Games/OO.pm
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-01-16 02:27:49 -0500
committerdoy <doy@tozt.net>2009-01-16 02:27:49 -0500
commit9b6142ab854de0d1e49e9dc1739ed3cb608d9b83 (patch)
tree6af688bb6c42efdcf47725aaa2cc51f2f53d449f /lib/Bot/Games/OO.pm
parent55c92748922d0828a444296c13f6952b79678655 (diff)
downloadbot-games-9b6142ab854de0d1e49e9dc1739ed3cb608d9b83.tar.gz
bot-games-9b6142ab854de0d1e49e9dc1739ed3cb608d9b83.zip
make the attribute stuff into a metarole, rather than just overriding the metaclass
Diffstat (limited to 'lib/Bot/Games/OO.pm')
-rw-r--r--lib/Bot/Games/OO.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Bot/Games/OO.pm b/lib/Bot/Games/OO.pm
index df78003..9a9075f 100644
--- a/lib/Bot/Games/OO.pm
+++ b/lib/Bot/Games/OO.pm
@@ -2,8 +2,8 @@
package Bot::Games::OO;
use Moose ();
use Moose::Exporter;
+use Moose::Util::MetaRole;
-use Bot::Games::Meta::Class;
use Bot::Games::Meta::Method::Command;
sub command {
@@ -25,7 +25,13 @@ Moose::Exporter->setup_import_methods(
sub init_meta {
shift;
- return Moose->init_meta(@_, metaclass => 'Bot::Games::Meta::Class');
+ 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'],
+ );
+ return $options{for_class}->meta;
}
1;