G'day beaker121,
Welcome to the Monastery.
You'll need to show us the code where these global variables are defined; or, at least, a small extract of that code such that we can understand what is going on. Your prosaic description is unclear. Your posted code does not reference any global variables.
[Aside: I appreciate that this is your first post, so you probably didn't know about this, but please see "What shortcuts can I use for linking to other information?". As an example, writing vars::global, instead of just vars::global, makes referencing modules you're discussing a lot easier.]
By the way, "return $self->{$name} || '';" looks dodgy. If the actual value was zero, did you really want to report it as a zero-length string. I don't know enough about your code, but suspect exists() and/or defined() might be useful here.
— Ken
In reply to Re: Best Practice for Replacing Globals
by kcott
in thread Best Practice for Replacing Globals
by beaker121
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |