On Fri Jan 04 07:01:03 2013, TOBYINK wrote:
Show quoted text> Loading UNIVERSAL::DOES on Perl < 5.010 would make behaviour more
> consistent across Perl versions.
How would it make behavior more consistent? Dispatch::Class doesn't use
UNIVERSAL::DOES() (at least not directly).
Dispatch::Class checks whether the exception object ->can('DOES'). This
check succeeds if
- you're running a modern perl where UNIVERSAL::DOES exists by default
- you're running an old perl and someone has loaded UNIVERSAL::DOES (the
module), which defines UNIVERSAL::DOES (the sub)
- you're running an old perl and the exception object composes some
roles, in which case it will have a custom DOES method anyway
So the check only fails if
- you're running an old perl, no one has defined UNIVERSAL::DOES()
manually, and the exception object doesn't use roles
... in which case Dispatch::Class falls back to ->isa(), which is what
UNIVERSAL::DOES would have done anyway. This is why I don't think
loading UNIVERSAL::DOES would make a difference.
(I'm going to close this bug. Please re-open it if I've overlooked
anything in my analysis above!)