|Think about Loose Coupling|
Global Varsby Melly (Hermit)
|on Sep 04, 2009 at 13:31 UTC||Need Help??|
Melly has asked for the
wisdom of the Perl Monks concerning the following question:
I've got a big chunk of code for some data-transformation. Basically, it reads in some mapping information, some config options, and then processes a hefty data-file.
This data-file consists of n number of lines per subject, and the process handles each subject, reading, translating and outputting data, and then moves on to the next subject.
Now, all the subject-specific stuff uses local variables, and passes them to sub-routines in the approved fashion.
However, the mapping and config options are all stored in global vars.
How much of this is a no-no IYHO? (ONSHO?)
Tom Melly, pm (at) cursingmaggot (stop) co (stop) uk