in reply to Referring SUPER to superclass of object

In perlobj, if you search for SUPER, you should find some usage examples (all within about 15 lines).

Update: Misreading of the OP on my part. Thanks for the clarification tilly.

--MidLifeXis

  • Comment on Re: Referring SUPER to superclass of object

Replies are listed 'Best First'.
Re^2: Referring SUPER to superclass of object
by tilly (Archbishop) on Jan 12, 2011 at 15:42 UTC
    The original question makes it clear that the questioner has read that documentation and understood it, and it did not solve the questioner's problem. Your answer therefore provides no useful information.

    The problem the question has run across is the following. Suppose that class A inherits from B and C, and class B inherits from D. What the questioner needs to do is search for all of the ancestors of a method in the path (B, D, C). Unfortunately SUPER is only aware of the inheritance of the class, not the object, so if SUPER finds a method in B, then SUPER called from that method will miss D.

    This limitation is documented (somewhat tersely) in perlobj, and the original question quotes that limitation.