summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-10-31 15:42:50 -0500
committerJesse Luehrs <doy@tozt.net>2009-10-31 15:42:50 -0500
commit433b5b5c12fa697e1a6ea2b1d34a1ba3dd9d009d (patch)
treee68982c304a7a811529b352dc10eb1b1dd6ddf76
parent5af5428d564bb0c0748ddac21fa5823c1c19f965 (diff)
downloadbot-games-433b5b5c12fa697e1a6ea2b1d34a1ba3dd9d009d.tar.gz
bot-games-433b5b5c12fa697e1a6ea2b1d34a1ba3dd9d009d.zip
have Bot::Games::OO set the base class
-rw-r--r--lib/Bot/Games/OO.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/Bot/Games/OO.pm b/lib/Bot/Games/OO.pm
index 0131a1a..c05cf77 100644
--- a/lib/Bot/Games/OO.pm
+++ b/lib/Bot/Games/OO.pm
@@ -2,8 +2,18 @@ package Bot::Games::OO;
use IM::Engine::Plugin::Commands::OO ();
use Moose::Exporter;
-Moose::Exporter->setup_import_methods(
- also => ['IM::Engine::Plugin::Commands::OO'],
+my ($import, $unimport, $init_meta) = Moose::Exporter->build_import_methods(
+ install => [qw(import unimport)],
+ also => ['IM::Engine::Plugin::Commands::OO'],
);
+sub init_meta {
+ my ($package, %options) = @_;
+ $options{base_class} = 'Bot::Games::Game'
+ if !exists $options{base_class}
+ && $options{for_class} ne 'Bot::Games::Game';
+ IM::Engine::Plugin::Commands::OO->init_meta(%options);
+ goto $init_meta;
+}
+
1;