At 2:06 PM +0000 2/19/03, Peter Haworth wrote:
On Fri, 14 Feb 2003 15:56:25 -0500, Dan Sugalski wrote:
I got clarification. The sequence is:

 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

Shouldn't we be traversing the inheritance tree once, doing these three steps at each node until one works, rather doing each step once for the whole tree. MM dispatch probably complicates this, though.

No, you have to do it multiple times. AUTOLOAD is a last-chance fallback, so it ought not be called until all other chances have failed.


If my derived class has an autoloaded method which overrides the base class'
method, I don't want the base class method to be called, just because parrot
does things in a peculiar order. Well, I know it's the same order that perl5
does things, but it's still peculiar.

If you prototype the sub but AUTOLOAD the body it'll work OK. -- Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to