in reply to Re: A little overloading conundrum
in thread A little overloading conundrum
I suppose (untested) I could do:1.If the first operand has declared a subroutine to overload the opera +tor then use that implementation.
and that would at least call module A's oload_minus() subroutine .... which would then be structured to de-reference the first argument and return the intended result.my $n2 = (\$B_obj) - $A_obj;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: A little overloading conundrum
by ysth (Canon) on Mar 08, 2026 at 03:22 UTC | |
by syphilis (Archbishop) on Mar 08, 2026 at 04:38 UTC |