diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-10-31 15:39:00 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-10-31 15:39:00 -0500 |
commit | 19bbc930718013e2796aed28d69ba4b6089dad45 (patch) | |
tree | 3e3aaec009ee7398c1d9b10aa3176f5566871b5a | |
parent | a256cdbddaf1ec773cbdc71eeccc0fd9910cbb65 (diff) | |
download | im-engine-plugin-commands-19bbc930718013e2796aed28d69ba4b6089dad45.tar.gz im-engine-plugin-commands-19bbc930718013e2796aed28d69ba4b6089dad45.zip |
use the base_class init_meta option rather than doing the logic myself
-rw-r--r-- | lib/IM/Engine/Plugin/Commands/OO.pm | 5 |
1 files 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; } |