diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2021-12-08 11:42:47 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2021-12-14 22:33:14 +0000 |
commit | 154c57f9af4d02a7f0aff4f15ce803e6534d5186 (patch) | |
tree | abcc304375d41dc4deff02b2178e8f9efae02583 | |
parent | 8afefe89e74ffb8f7e75793b9aa5a1c0e8b674b2 (diff) | |
download | perl-154c57f9af4d02a7f0aff4f15ce803e6534d5186.tar.gz |
Use builtin::blessed() in overload.pm rather than using Scalar::Util
-rw-r--r-- | lib/overload.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/overload.pm b/lib/overload.pm index 8a5eeb8df8..88e5ecc657 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -3,7 +3,7 @@ package overload; use strict; no strict 'refs'; -our $VERSION = '1.33'; +our $VERSION = '1.34'; our %ops = ( with_assign => "+ - * / % ** << >> x .", @@ -101,8 +101,7 @@ sub Method { if(ref $package) { local $@; local $!; - require Scalar::Util; - $package = Scalar::Util::blessed($package); + $package = builtin::blessed($package); return undef if !defined $package; } #my $meth = $package->can('(' . shift); @@ -972,7 +971,7 @@ Gives the string value of C<arg> as in the absence of stringify overloading. If you are using this to get the address of a reference (useful for checking if two references point to the same thing) then you may be better off using -C<Scalar::Util::refaddr()>, which is faster. +C<builtin::refaddr()> or C<Scalar::Util::refaddr()>, which are faster. =item overload::Overloaded(arg) |