diff options
-rw-r--r-- | lib/smartmatch/engine/rjbs.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/smartmatch/engine/rjbs.pm b/lib/smartmatch/engine/rjbs.pm index fb2dfc6..6f0d964 100644 --- a/lib/smartmatch/engine/rjbs.pm +++ b/lib/smartmatch/engine/rjbs.pm @@ -11,13 +11,13 @@ sub match { if (!defined($b)) { return !defined($a); } - elsif (blessed($b) && my $overload = overload::Method($b, '~~')) { + elsif (blessed($b) && (my $overload = overload::Method($b, '~~'))) { return $b->$overload($a, 1); } elsif (reftype($b) eq 'REGEXP') { return $a =~ $b; } - elsif (blessed($b) && my $overload = overload::Method($b, '=~')) { + elsif (blessed($b) && overload::Method($b, '=~')) { return $a =~ $b; } elsif (!blessed($b) && reftype($b) eq 'CODE') { |