Jeff 'japhy' Pinyan wrote:

>BUT HERE, we're using
>
>$class->OtherClass::method(@_);
>
>which says explicitly to start looking for method() in OtherClass
>(and if it fails there, look in OtherClass's @ISA).  So
>
>$class->Animal::speak();
>
>in your case becomes
>
>Animal::speak($class);
>
>except that it becomes that DYNAMICALLY.

I see. So Animal just marks the starting point for the search, and it might become 
LivingCreature::speak($class) later on if speak is not found in Animal.
>
>>And when Perl does not find Animal::speak in Mouse, to:
>
>Ah, here's the confusion.  This isn't looking for a method named
>'Animal::speak' in 'Mouse'; it's looking for a method named 'speak'
>in 'Animal'.
>
>Only the right-most part of a Thing::Like::this denotes the name of
>a method.

That's exactly the information I was looking for. Thank you, Japhy.

- Jan
-- 
These are my principles and if you don't like them... well, I have others. - Groucho 
Marx

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to