Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
When overloading binary operators e.g. '+', perl calls the overloading sub/method with 3 arguments - the 2 operator arguments (as objects) and a flag indicating whether perl has swapped the 2 arguments before calling the sub/method (see overload - as you probably already have :-). Therefore, your use of rmvObjRef() is incorrect in this context.
Consider: In the above, the assignments to $c, $d & $e result in slightly different invocations of addObjects(), but will all have the same post-run value - assuming the call to rmvObjRef() is removed/commented out.
A user level that continues to overstate my experience :-))
In reply to Re: Remove bless reference or class/package name from method arguments
by Bloodnok
|
|