in reply to Re: symbolic reference + inheritance
in thread symbolic reference + inheritance
If the name of the method is in a scalar. However . . what if I want to construct the name of the method?$pack->$method
but say I want to invoke "function2" . . I could say$pack = "derived"; $method = "function";
But could it be done in one line? Something like . .$method = "function2"; $path->$method
$pack->"${method}2"(); # <-- doesnt compile
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: symbolic reference + inheritance
by merlyn (Sage) on Sep 26, 2009 at 00:44 UTC | |
|
Re^3: symbolic reference + inheritance
by almut (Canon) on Sep 25, 2009 at 21:11 UTC | |
by toddfreed (Novice) on Sep 25, 2009 at 21:18 UTC | |
|
Re^3: symbolic reference + inheritance
by AnomalousMonk (Archbishop) on Sep 26, 2009 at 09:23 UTC | |
by merlyn (Sage) on Sep 26, 2009 at 16:06 UTC | |
by almut (Canon) on Sep 26, 2009 at 10:03 UTC | |
by AnomalousMonk (Archbishop) on Sep 26, 2009 at 12:30 UTC | |
by ikegami (Patriarch) on Sep 26, 2009 at 12:57 UTC |