summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/overload.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/overload.pm b/lib/overload.pm
index 715f10a277..fb1a0d1236 100644
--- a/lib/overload.pm
+++ b/lib/overload.pm
@@ -91,7 +91,7 @@ sub AddrRef {
}
sub StrVal {
- (OverloadedStringify($_[0]) or ref($_[0]) eq 'Regexp') ?
+ (ref $_[0] && OverloadedStringify($_[0]) or ref($_[0]) eq 'Regexp') ?
(AddrRef(shift)) :
"$_[0]";
}