summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-01-25 19:10:02 -0500
committerdoy <doy@tozt.net>2009-01-25 19:10:02 -0500
commit95d541d71019038631f80a7a66b1f7f86a10599c (patch)
tree007d1a3382f9dfe43bc7af35c8c53efb4c1fbe93
parent92e666057ee84e1b3f306aa6016bfcc64a960552 (diff)
downloadbot-games-95d541d71019038631f80a7a66b1f7f86a10599c.tar.gz
bot-games-95d541d71019038631f80a7a66b1f7f86a10599c.zip
need to call BUILDALL on $self, not $class
-rw-r--r--lib/Bot/Games.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Bot/Games.pm b/lib/Bot/Games.pm
index 9d42e1b..cc412ef 100644
--- a/lib/Bot/Games.pm
+++ b/lib/Bot/Games.pm
@@ -6,7 +6,13 @@ use Module::Pluggable
except => ['Bot::Games::Game::Ghostlike'],
sub_name => 'games';
extends 'Bot::BasicBot', 'Moose::Object';
-after new => sub { shift->BUILDALL };
+around new => sub {
+ my $orig = shift;
+ my $class = shift;
+ my $self = $class->$orig(@_);
+ $self->BUILDALL({@_});
+ return $self;
+};
has prefix => (
is => 'rw',