![]() |
|
Think about Loose Coupling | |
PerlMonks |
Re: List Wrapper for Object Methods.by Prior Nacre V (Hermit) |
on Dec 03, 2004 at 13:38 UTC ( [id://412117]=note: print w/replies, xml ) | Need Help?? |
While I understand that this can be a little disconcerting, you shouldn't let it worry you. Tutorials typically indicate this with examples like:
As an analogy, consider navigating a directory structure. When you type cd lib you will either change to a new directory (dependent on the current directory) or receive an error message (if no lib directory exists). Similarly, invoking the method draw() will either run some code (dependent on the class of the invocant) or will produce an error (Can't find method ...). As you haven't indicated any inheritance in your question or code, I have avoided a discussion of polymorphism. A musing: Could the analogy be extended to include polymorphism if I used David Korn's version of cd? Regards, PN5
In Section
Seekers of Perl Wisdom
|
|