I discovered this earlier query that addresses the problem. The Title is:
“How do I cope with world variables in current legacy code (or, what’s higher, world hell or sample hell)?”
My query is to ask for extra element in how one can accomplish the final a part of the answer. The most well-liked resolution says:
“Over time you’ll be able to hope to kick the can all the way in which to the top of the highway, by eradicating all direct information of the worldwide occasion from each class, and at last eliminating the worldwide occasion…”
I’ve a mission the place I’ve grouped globals into a category, as steered within the resolution.
I’m additionally passing an occasion of this world class into the opposite lessons that want the globals.
What I do not perceive is how one can accomplish that final step to “lastly eliminating the worldwide occasion…”.