summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-10-31 15:31:22 -0500
committerJesse Luehrs <doy@tozt.net>2009-10-31 15:31:22 -0500
commitee0eb7aa58e92e4dc21068dac668d52627c720ce (patch)
treef307f045a6f77b60dff11d9db4d997d803492987
parent209209d52ed62d62ef477e4385c4021723efc105 (diff)
downloadim-engine-plugin-commands-ee0eb7aa58e92e4dc21068dac668d52627c720ce.tar.gz
im-engine-plugin-commands-ee0eb7aa58e92e4dc21068dac668d52627c720ce.zip
get rid of a warning when no coderef is passed to command
-rw-r--r--lib/IM/Engine/Plugin/Commands/OO.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/IM/Engine/Plugin/Commands/OO.pm b/lib/IM/Engine/Plugin/Commands/OO.pm
index 0d7753a..43321fa 100644
--- a/lib/IM/Engine/Plugin/Commands/OO.pm
+++ b/lib/IM/Engine/Plugin/Commands/OO.pm
@@ -7,7 +7,7 @@ sub command {
my $caller = shift;
my $name = shift;
my $code;
- $code = shift if reftype($_[0]) eq 'CODE';
+ $code = shift if defined(reftype($_[0])) && reftype($_[0]) eq 'CODE';
my %args = @_;
my $method_meta = $caller->meta->get_method($name);