in reply to dispatch table of functions and arguments
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) ;
}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: dispatch table of functions and arguments
by Sihal (Pilgrim) on Sep 03, 2002 at 14:26 UTC | |
by Sihal (Pilgrim) on Sep 03, 2002 at 14:45 UTC | |
Re: Re: dispatch table of functions and arguments
by Sihal (Pilgrim) on Sep 03, 2002 at 15:07 UTC | |
Re: Re: dispatch table of functions and arguments
by Sihal (Pilgrim) on Sep 03, 2002 at 14:20 UTC |
In Section
Seekers of Perl Wisdom