From 188ad8e49c1fa2802eaa55b3d4ae978f2c58c23c Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 31 Oct 2009 15:16:49 -0500 Subject: convert Bot::Games to use IM::Engine::Plugin::Commands --- lib/Bot/Games/OO/Game/Role.pm | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 lib/Bot/Games/OO/Game/Role.pm (limited to 'lib/Bot/Games/OO/Game/Role.pm') diff --git a/lib/Bot/Games/OO/Game/Role.pm b/lib/Bot/Games/OO/Game/Role.pm deleted file mode 100644 index 8aee3a4..0000000 --- a/lib/Bot/Games/OO/Game/Role.pm +++ /dev/null @@ -1,28 +0,0 @@ -package Bot::Games::OO::Game::Role; -use Bot::Games::OO::Role (); - -# XXX: is there a better way to go about this? -*command = \&Bot::Games::OO::Game::command; -Moose::Exporter->setup_import_methods( - with_caller => ['command'], - also => ['Bot::Games::OO::Role'], -); - -sub init_meta { - shift; - my %options = @_; - Moose::Role->init_meta(%options); - Moose::Util::MetaRole::apply_metaclass_roles( - for_class => - $options{for_class}, - attribute_metaclass_roles => - ['Bot::Games::Trait::Attribute::Command', - 'Bot::Games::Trait::Attribute::Formatted'], - metaclass_roles => - ['Bot::Games::Trait::Class::Command', - 'Bot::Games::Trait::Class::Formatted'], - ); - return $options{for_class}->meta; -} - -1; -- cgit v1.2.3-54-g00ecf