At 2:46 PM -0500 2/10/03, attriel wrote:
I got clarification. The sequence is:>>Just to confuse things more, there is a question I have reguardingmulti-methods and inheritance.Consider class A defines foo() as a multi-method with 3 different signatures If class B then sub-classes A and defines a method foo() does it 1 override all foo() methods in A 2 get added to the foo() methods in the dispatch, so we now have a multi-method with 4 signatures 3 override only the method in A that has the same signature My guess would be (1) and that multi-method distpatch would only happen if B called ->SUPER::foo In which case you could consider that there is only one method named foo(). That method does the dispatch to the others.D'oh! That's a good question--I'll ask in a few minutes and find out. --Based on normal OO behaviour, I would assume (3) (which is the same as (2) if there's no override). the ->SUPER::foo would be called to invoke the overridden/shadowed version of that signature ...
1) Search for method of the matching name in inheritance tree
2) if #1 fails, search for an AUTOLOAD
3) if #2 fails (or all AUTOLOADs give up) then do MM dispatch
It looks like if there are multiple methods with the same name in a class then we do MMD after we find them in step 1, though that's a little uncertain. (Makes sense to me, though)
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk