Feb 21, 2007, 1:17 PM
Post #1 of 3
I'll looking for folks opinion on whether the behavior of a module used in a script should ever be indirectly contolled using environment variables and not by the script itself.
Contolling lib behavior using environment variables
I contend this is bad design and that all parameters whether they're retrieved from the enviroment or set on the command line should always pass through the script, where upon the script tells the modules what parameters settings to use.
Other folks contend that this requires more coding and maintenance at the script level. They believe that controlling behavior at the module level promotes better code reuse and thus a better design.
What's your opinion?