diff options
-rw-r--r-- | lib/IM/Engine/Plugin/Commands/Trait/Method/Formatted.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/IM/Engine/Plugin/Commands/Trait/Method/Formatted.pm b/lib/IM/Engine/Plugin/Commands/Trait/Method/Formatted.pm index 82dcd04..adef334 100644 --- a/lib/IM/Engine/Plugin/Commands/Trait/Method/Formatted.pm +++ b/lib/IM/Engine/Plugin/Commands/Trait/Method/Formatted.pm @@ -14,7 +14,7 @@ has formatter => ( sub _munge_formatter { my $self = shift; my ($format) = @_; - return $format if reftype($format) eq 'CODE'; + return $format if defined(reftype($format)) && reftype($format) eq 'CODE'; return $self->associated_metaclass->formatter_for($format); } |