> ==================================================================
> Either way I'm not sure it solves the problem; if each module asserts
> that *they* are the smarter one then you either wind up with the same
> situation you have now or even worse contention.
> ==================================================================
>
> Yes. So do not do this.
My concern was not if you have control over both modules, but what if
you don't?
Then you need a way to say ":override_the_override". But then you're
back at square one.
Python has a neat method called C<__radd__> which acts when it's the
right argument in +, and to my understanding allows two classes to
interoperate in some situations. You might want to check it out if
you're not familiar with it:
http://www.python.org/doc/2.0b1/ref/numeric-types.html
There are C<__r*__> methods for all of the binary ops.
Finally, rather than being implemented in terms of single ":override"
tag, I think a better way might be to attach attributes to the special
subs:
sub ADD : override('Math::BigInt') { }
sub DIV { }
sub MUL : override(__ALL__) { }
Because you may not want to override all operations for a class.
-Nate