From 19bbc930718013e2796aed28d69ba4b6089dad45 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 31 Oct 2009 15:39:00 -0500 Subject: use the base_class init_meta option rather than doing the logic myself --- lib/IM/Engine/Plugin/Commands/OO.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/IM/Engine/Plugin/Commands/OO.pm b/lib/IM/Engine/Plugin/Commands/OO.pm index 222788b..ba0ba75 100644 --- a/lib/IM/Engine/Plugin/Commands/OO.pm +++ b/lib/IM/Engine/Plugin/Commands/OO.pm @@ -57,10 +57,9 @@ my ($import, $unimport, $init_meta) = Moose::Exporter->build_import_methods( sub init_meta { my ($package, %options) = @_; + $options{base_class} = 'IM::Engine::Plugin::Commands::Command' + if $options{for_class} ne 'IM::Engine::Plugin::Commands::Command'; Moose->init_meta(%options); - Class::MOP::class_of($options{for_class})->superclasses( - 'IM::Engine::Plugin::Commands::Command' - ) if $options{for_class} ne 'IM::Engine::Plugin::Commands::Command'; goto $init_meta; } -- cgit v1.2.3-54-g00ecf