Surely using positional parameters causes serious braindamage :-)
A solution could be using named parameters (a hash, I mean). For example, parameters for ClickInterval and Exposure could be respectively:
%param = ( firstClick => 12345, secondClick => 21345) ;
and
%param = ( 'value' => 911 ) ; # call for help on "Exposure"
Once you compose the %param hash someway, you could end up your code with a simple call:
my @res = $function_etc_etc{$a_function}->(%params) ;
and each sub will get only the parameters it deserves :-)
Ciao!
--bronto
# Another Perl edition of a song:
# The End, by The Beatles
END {
$you->take($love) eq $you->made($love) ;
}
In reply to Re: dispatch table of functions and arguments
by bronto
in thread dispatch table of functions and arguments
by Sihal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |