in reply to Re: "polymorphism" hack: nuts or wise?
in thread "polymorphism" hack: nuts or wise?
You can say if ($obj->isa('Node')) to see if an object is a Node, or inherits from Node.Is that even necessary? If an object inherits from Node, it'll have the Object->container method in the same way as the parent Node object has (provided, that is, if the object doesn't override the method). Also, it would send me back to a chain of if / elsif / else statements?
|
|---|