|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Re: A little overloading conundrumby swl (Prior) |
| on Mar 07, 2026 at 03:42 UTC ( [id://11167414]=note: print w/replies, xml ) | Need Help?? |
|
There's nothing I can think of and the documentation suggests it's not something that is easy to do. One could reverse the order so $A_obj is checked first: my $n2 = -$A_obj + $B_obj;. That's obviously not practical, though, and would also need neg overloading on $A_obj (and addition if not already done).
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||