Lotus1 has asked for the wisdom of the Perl Monks concerning the following question:
I need to provide a package variable in a module I'm working on to let the user turn on or off a feature. It's a simple non object oriented module. I've used Data::GUID::Any before and remembered there is a package variable called UC that is used exactly like what I want to do. The user can get lower case GUIDs by setting it to false but it defaults to positive.
local $Data::GUID::Any::UC; guid_as_string(); # will be lower case
My question is since this variable isn't a constant should it be uppercase? Perhaps the author just wanted to avoid having it look similar to uc().
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: when to capitalize package variables
by kcott (Archbishop) on Feb 06, 2021 at 08:45 UTC | |
by Lotus1 (Vicar) on Feb 06, 2021 at 17:51 UTC | |
|
Re: when to capitalize package variables
by haukex (Archbishop) on Feb 06, 2021 at 08:48 UTC | |
by eyepopslikeamosquito (Archbishop) on Feb 06, 2021 at 10:13 UTC | |
|
Re: when to capitalize package variables
by stevieb (Canon) on Feb 06, 2021 at 02:17 UTC | |
|
Re: when to capitalize package variables
by AnomalousMonk (Archbishop) on Feb 06, 2021 at 02:36 UTC | |
|
Re: when to capitalize package variables
by jcb (Parson) on Feb 06, 2021 at 02:23 UTC |