BUU has asked for the wisdom of the Perl Monks concerning the following question:
What about replacing the subs (sub opt1 {}, etc) with perl files? And your end answer would be do $hash{$value} ? Is this a bad idea? The reasoning for this would it would help to seperate implementation from logic (i hope), in that you would have a series of files for each option, as opposed to having to modify one file, as well as being able to swap in different files very easily. But, as far as i know, do is generally regarded as bad?my %hash=( opt1=>\&opt1, opt2=>\&opt2, opt3=>\&opt3,); &{$hash{$value}};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Do file.pl (replacing subs?)
by BrowserUk (Patriarch) on Sep 23, 2002 at 05:54 UTC | |
by BUU (Prior) on Sep 23, 2002 at 13:23 UTC | |
by chromatic (Archbishop) on Sep 23, 2002 at 17:39 UTC | |
by BUU (Prior) on Sep 23, 2002 at 23:36 UTC | |
by Aristotle (Chancellor) on Sep 23, 2002 at 17:21 UTC | |
|
Re: Do file.pl (replacing subs?)
by perrin (Chancellor) on Sep 23, 2002 at 16:34 UTC |