summaryrefslogtreecommitdiffstats
path: root/lib/Bot/Games/OO.pm
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-01-16 00:09:57 -0500
committerdoy <doy@tozt.net>2009-01-16 00:09:57 -0500
commit9c9ec9d5b18b1e3147080bef2b3a592a9800ec92 (patch)
tree44a966d9eece1a15718a42d072673d3b7ad2af64 /lib/Bot/Games/OO.pm
parent2b478c9e0291e6dc676c654d45098936f0a924cb (diff)
downloadbot-games-9c9ec9d5b18b1e3147080bef2b3a592a9800ec92.tar.gz
bot-games-9c9ec9d5b18b1e3147080bef2b3a592a9800ec92.zip
okay, i think i finally have the meta-stuff done properly... we'll see!
Diffstat (limited to 'lib/Bot/Games/OO.pm')
-rw-r--r--lib/Bot/Games/OO.pm13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/Bot/Games/OO.pm b/lib/Bot/Games/OO.pm
index abe8238..f5fb4cb 100644
--- a/lib/Bot/Games/OO.pm
+++ b/lib/Bot/Games/OO.pm
@@ -2,19 +2,18 @@
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 {
my $class = shift;
my ($name, $code) = @_;
- my $method_meta = Moose::Meta::Method->wrap(
+ my $method_meta = Bot::Games::Meta::Method::Command->wrap(
$code,
package_name => $class,
name => $name,
);
- $method_meta->command(1);
$class->meta->add_method($name, $method_meta);
}
@@ -25,13 +24,7 @@ Moose::Exporter->setup_import_methods(
sub init_meta {
shift;
- my %options = @_;
- Moose->init_meta(%options, metaclass => 'Bot::Games::Meta::Class');
- Moose::Util::MetaRole::apply_metaclass_roles(
- for_class => $options{for_class},
- method_metaclass_roles => ['Bot::Games::Meta::Role::Command'],
- );
- return $options{for_class}->meta;
+ return Moose->init_meta(@_, metaclass => 'Bot::Games::Meta::Class');
}
1;