in reply to Re^2: "Hash Matrix" Design Question
in thread "Hash Matrix" Design Question
Then your conf idea sounds good.
A different idea might be to have three subs like this:
my @alloptions=(); my @allOS=(); sub add_OS { # add an operation system to the configuration matrix my $os= shift; push @allOS, $os; foreach my $opt (@alloptions) { calculate_parameter($os,$opt); } } sub add_option { # add a configuration option to the configuration matrix my $option= shift; push @alloptions, $option; foreach my $os (@allOS) { calculate_parameter($os,$option); } } sub calculate_parameter { # calculate the option parameter in a specific OS my ($os, $option)= @_; ...
Creating and filling the matrix is automatically done by calling add_OS and add_option for every os and option.
|
|---|