in reply to goto superclass method
Well, I don't know if this is necessarily the best way to go about it, but then, I don't know what problem you're trying to solve. It sounds like a design issue rather than a syntax issue (i.e., are you sure you don't have a design flaw?) In any event, here's a rough way to do it:
sub dostuff { # you'll want to walk your inheritance tree rather than hardcode thi +s foreach my $super (search_isa()) {# <-- you implement :) if (my $method = UNIVERSAL::can($super, 'dostuff')) { goto $method; } } }
I feel dirty just telling you this :)
Cheers,
Ovid
New address of my CGI Course.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: goto superclass method
by ikegami (Patriarch) on Dec 22, 2004 at 18:11 UTC | |
by Ovid (Cardinal) on Dec 22, 2004 at 18:29 UTC | |
|
Re^2: goto superclass method
by ikegami (Patriarch) on Dec 22, 2004 at 19:21 UTC | |
|
Re^2: goto superclass method
by chromatic (Archbishop) on Dec 22, 2004 at 19:46 UTC | |
by Ovid (Cardinal) on Dec 22, 2004 at 21:21 UTC | |
by chromatic (Archbishop) on Dec 22, 2004 at 21:53 UTC | |
by Ovid (Cardinal) on Dec 22, 2004 at 22:19 UTC | |
by Aristotle (Chancellor) on Dec 22, 2004 at 22:37 UTC | |
by Joost (Canon) on Dec 22, 2004 at 21:52 UTC | |
|
Re^2: goto superclass method
by avarus (Novice) on Dec 22, 2004 at 18:26 UTC | |
|
Re^2: goto superclass method
by ysth (Canon) on Dec 23, 2004 at 02:47 UTC |