When I write an AUTOLOAD method, I'll typically dynamically decide at runtime whether or not I really want to handle it. Anyone who assumes that I'll handle their method because I have an AUTOLOAD is more often wrong than right.
Unless we coordinate on how to declare methods, there is no good answer to that.
Furthermore I am uncomfortable with encouraging people to roll their own can because when I use it, I darned well expect it to work right and they might get it wrong. Do they handle multiple inheritance properly? Do they return a subroutine that can be called directly? (Returning the AUTOLOAD won't work.) Do they return the same subroutine multiple times for the same class?
Yes, I have written code which would break if you change any of the above properties.
Anyone who cannot be trusted to think of all of this shouldn't be overwriting globally defined methods which could be called by other people who expect that things work properly.
This discussion might be worth promoting to a root note, since there's a lot of philosophy involved.
I believe that you should override can when you provide an AUTOLOAD so that the normal Perl mechanisms work appropriately. I want to be able to ask "does this package or class or object have a subroutine or method of this name"?
Not providing can means I might get the wrong answer.
I'm not convinced by the point that you want to decide this at runtime — your can can use the same behavior as your AUTOLOAD. The same goes for returning the correct code reference. If you can get it right in one spot, you can get it right in another.
I also think that any programmer smart or experienced enough to get AUTOLOAD right is capable of getting can right. You're right that it can be tricky, but can is also documented.
If people get it wrong, well, people get all sorts of things wrong. That doesn't mean that no one should do those things.
Well, if it we're a means of getting responses for methods you don't know of it would be nice - most people that go around breaking it simply implement their own (see Class::Classless - i just submitted a patch (phew, a whole one line) for it to return code refs instead of 1, and Class::Object - i trust the documentation).
The problem is that @ISA is not used, or perl's builtin method calling system is extended. That's the showstopper.
Provided Autoload would provide (and export) a can, which either returns an anonymous subroutine that takes care of things, or actually loads the sub and returns a subroutine ref to that, It should pose no problem at all.