rovf has asked for the wisdom of the Perl Monks concerning the following question:
In the following code, the name of the method to be called is calculated at run time:
This works. Is it possible to do the same without using an auxiliary variable, $method?my $object=MyObj->new(); .... my $method=method_name(...); $object->$method();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Syntax question: Method call, where method name is calculated from an expression
by shmem (Chancellor) on Dec 04, 2009 at 14:08 UTC | |
by rovf (Priest) on Dec 04, 2009 at 15:52 UTC | |
|
Re: Syntax question: Method call, where method name is calculated from an expression
by moritz (Cardinal) on Dec 04, 2009 at 12:30 UTC | |
by rovf (Priest) on Dec 04, 2009 at 15:48 UTC | |
|
Re: Syntax question: Method call, where method name is calculated from an expression
by LanX (Saint) on Dec 04, 2009 at 20:47 UTC | |
by rovf (Priest) on Jan 21, 2010 at 14:12 UTC |