summaryrefslogtreecommitdiffstats
path: root/lib/IM/Engine/Plugin/Commands/OO.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IM/Engine/Plugin/Commands/OO.pm')
-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);