in reply to Shell Menu Code Review
There's a lot of really tight connections between your subs: main_block assumes that there are exactly 2 options, user_choice assumes it knows exactly what option 1 and option 2 are, etc.... Subs are really usefull from a design perspective because they setup a "black box" that will take some input, perform some actions, and produce some output. But by interconnecting them so much, you're losing all of their power -- no one can ever modify one of your subs without touching all of the other ones -- which kinda defeats the point.
That's not to say that they way you are doing things is inheriently bad given the scope of your script. I just think you are missleading anybody who ever reads your code in the future. You're script would accutally be more readable if you eliminated the subs, and had a basic sequential series of code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Shell Menu Code Review
by softworkz (Monk) on Jul 25, 2002 at 19:42 UTC | |
|
Re: Re: Shell Menu Code Review
by PrimeLord (Pilgrim) on Jul 25, 2002 at 19:48 UTC |