in reply to Calling instance methods with the method name stored in a variable
In both cases, you can just use the scalar holding the method name directly:
and$obj->$method(@arguments);
$class->$method(@arguments);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Calling instance methods with the method name stored in a variable
by Cybris (Sexton) on Jun 05, 2009 at 07:46 UTC |