Subject: | leaks on object with overloaded "+" |
Date: | Tue, 20 Apr 2010 04:38:07 +1000 |
To: | bug-Test-Weaken [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
Test::Weaken 3.002 seems to run an overloaded "+" on objects traced,
where I hoped it would not.
bigint.pl below reports no leaks, but I think it should say $x leaked.
And overload.pl below dies with
I am not in the adding mood at /usr/share/perl5/Test/Weaken.pm line 163
I struck this with perl-glib where "flags" are a scalar ref with
overloaded "+". They don't allow addition with a number like "$flags+0"
(only another flags of its own kind, and some strings).
I see Scalar::Util::refaddr is imported, and noted in the docs, I
suppose it has the advantage over numizing "$obj+0" of avoiding
overload.pm nonsense.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.