This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove redundant check from overload.pm
authorFather Chrysostomos <sprout@cpan.org>
Wed, 10 Sep 2014 02:22:30 +0000 (19:22 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 10 Sep 2014 02:53:23 +0000 (19:53 -0700)
I added this in ca6102577e.  It is silly to check ref $sub a few
lines after $sub = \&....

lib/overload.pm

index 51801d6..20c0119 100644 (file)
@@ -81,7 +81,7 @@ sub ov_method {
   return undef unless $globref;
   my $sub = \&{*$globref};
   no overloading;
-  return $sub if !ref $sub or $sub != \&nil;
+  return $sub if $sub != \&nil;
   return shift->can($ {*$globref});
 }