summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-04-24 22:56:10 -0500
committerdoy <doy@tozt.net>2009-04-24 22:56:10 -0500
commit93220f905ec24e3a4ea4367fe15ed7c86b40f68b (patch)
treed42a301f1c28aa7116c9cf7f58ba945f0de3672e
parentdcdc1e4ac2404fb90b9d5f3390614c5cc46b3e0f (diff)
downloadbot-games-93220f905ec24e3a4ea4367fe15ed7c86b40f68b.tar.gz
bot-games-93220f905ec24e3a4ea4367fe15ed7c86b40f68b.zip
use MooseX::NonMoose
-rw-r--r--dist.ini1
-rw-r--r--lib/Bot/Games.pm9
-rw-r--r--lib/Bot/Games/OO.pm5
3 files changed, 6 insertions, 9 deletions
diff --git a/dist.ini b/dist.ini
index 1af47ce..ca9009d 100644
--- a/dist.ini
+++ b/dist.ini
@@ -16,3 +16,4 @@ MooseX::AttributeHelpers = 0
Moose = 0.64
List::Util = 1.05
Games::Word = 0.04
+MooseX::NonMoose = 0.01
diff --git a/lib/Bot/Games.pm b/lib/Bot/Games.pm
index dcc4671..83516bb 100644
--- a/lib/Bot/Games.pm
+++ b/lib/Bot/Games.pm
@@ -5,14 +5,7 @@ use Module::Pluggable
search_path => 'Bot::Games::Game',
except => ['Bot::Games::Game::Ghostlike'],
sub_name => 'games';
-extends 'Bot::BasicBot', 'Moose::Object';
-around new => sub {
- my $orig = shift;
- my $class = shift;
- my $self = $class->$orig(@_);
- $self->BUILDALL({@_});
- return $self;
-};
+extends 'Bot::BasicBot';
has prefix => (
is => 'rw',
diff --git a/lib/Bot/Games/OO.pm b/lib/Bot/Games/OO.pm
index 7f60115..16f4a75 100644
--- a/lib/Bot/Games/OO.pm
+++ b/lib/Bot/Games/OO.pm
@@ -42,7 +42,10 @@ sub init_meta {
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'],
+ metaclass_roles => ['Bot::Games::Meta::Role::Class',
+ 'MooseX::NonMoose::Meta::Role::Class'],
+ constructor_metaclass_roles =>
+ ['MooseX::NonMoose::Meta::Role::Constructor'],
);
return $options{for_class}->meta;
}