in reply to Naming Convention For Global Variables?
G'day Kurt,
I'd disagree that PBP doesn't give a hint. Chapter 3: Naming Conventions - Capitalization (page 45 in my copy) certainly gives a hint.
If by quasi constant, you mean a variable whose value isn't intended to be changed; why not make it an actual constant? If, for some reason, you can't do this, you can still treat it as a constant as far as naming is concerned: e.g. $CONSTANT_VAR_NAME. If you meant something else by quasi constant, please explain.
I'm not really sure what you mean by "... in conflict with perl special vars ...". The obvious answer is to pick a different name; however, I suspect you're not referring to variable names in perlvar. Please clarify.
Personally, I try to avoid global variables wherever possible. In cases where this isn't possible, I'd typically use something like: $Global_Var_Name.
-- Ken
|
|---|