The new smart match dispatch table for 5.10.1 onwards
This /does/ break backwards compatibility. Changes to come are:
- ~~ is no longer commutative. Dispatch is now done based on the
(run-time) type of the right side argument.
- The right side can be a ".." range, which will be treated specially,
and no longer as a boolean operator (as in scalar context).
- when() should treat "..." as a boolean operator.
- Coderefs with an empty prototype are no longer special.
- Any ~~ Array distributes the smart match test.
- Comparing two coderefs is no longer a special case and does not
perform referential equality. (Use \&foo ~~ "".\&bar for that.)
This patch also documents that ~~ won't work on objects that don't
overload it, except in the expression $object ~~ undef.