diff options
author | Brandon Black <blblack@gmail.com> | 2007-04-24 02:58:44 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-04-25 12:15:55 +0000 |
commit | 05a4b9b1cf732bd593a66695e9160c88fe43217c (patch) | |
tree | 61a3a6ef3e396bc736ed422a27ffa0f90ab3908f /lib/overload.pm | |
parent | 917f17002097ee577163787c18abe1a911b23f4e (diff) | |
download | perl-05a4b9b1cf732bd593a66695e9160c88fe43217c.tar.gz |
Re: [Andreas J. Koenig] C3 MRO breaks Params::Util and Graph
From: "Brandon Black" <blblack@gmail.com>
Message-ID: <84621a60704240558q7ff65863l803c6f9b9b8ca4a6@mail.gmail.com>
p4raw-id: //depot/perl@31073
Diffstat (limited to 'lib/overload.pm')
-rw-r--r-- | lib/overload.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/overload.pm b/lib/overload.pm index fdc1cfef58..5faaad33ab 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -1,6 +1,6 @@ package overload; -our $VERSION = '1.05'; +our $VERSION = '1.06'; sub nil {} @@ -72,7 +72,11 @@ sub OverloadedStringify { sub Method { my $package = shift; - $package = ref $package if ref $package; + if(ref $package) { + require Scalar::Util; + $package = Scalar::Util::blessed($package); + return undef if !defined $package; + } #my $meth = $package->can('(' . shift); ov_method mycan($package, '(' . shift), $package; #return $meth if $meth ne \&nil; |