in reply to goto superclass method

Why? The latter sounds like a useless "optimization" to me, especially since you say the first one works. If there is a reason, let us know and maybe we can address the real problem.

And no, there's no easy way that wouldn't require heavy symbol table manipulation. Well, maybe a module, but I find that unlikely.

Replies are listed 'Best First'.
Re^2: goto superclass method
by Ovid (Cardinal) on Dec 22, 2004 at 18:05 UTC

    Actually, it's very easy to do, as shown in my reply below. can returns a code ref and you can goto a code reference. The only tricky part is writing code that pulls in the entire inheritance heirarchy in the correct order so it can be searched. I suspect the original poster may find that less fast than "optimizing" the stack (if that's what was intended.)

    Cheers,
    Ovid

    New address of my CGI Course.

      can returns a code ref

      I did not know that until I saw your snippet below. Very nice!

Re^2: goto superclass method
by avarus (Novice) on Dec 22, 2004 at 18:01 UTC
    I never said I thought it was a good idea - I just want to know how it can be done!
    TIM
    --
    #Tip: use 'no strict' to make those nasty errors vanish.