in reply to Syntax question: Method call, where method name is calculated from an expression
Is there a reason why you don't add the dispatcher as an extra method to the class MyObj?
$obj->dispatcher(@arguments)
And even if you need this flexibility and don't care about encapsulation and DRY, you can still define a method call():
$obj->call(dispatcher(), @arguments)
giving you more and deeper possibilities to catch possible errors.
Cheers Rolf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Syntax question: Method call, where method name is calculated from an expression
by rovf (Priest) on Jan 21, 2010 at 14:12 UTC |