Best practice for custom module variable names? I've gotten into the habit of doing pretty robust configuration panes for my modules now, and I'm finding the variable names &amp; management to be quite the pain.

I have variables like mymodule_section_subvar_varname_type_context and I not only loose track of the order of the elements in my variable names but I feel as if having a variable name that long is a design flaw.

I've been considering using a serialized array in a variable mymodule_section_settings in conjunction with a set of functions that make it easy to maintain that array but I'd love some input in what (if any) best practices have been established outside of prefixes and/or examples of modules that we trust and what they are doing for large sets of variables.

Thanks!
It is possible to use a Drupal variable to contain an array; that is what Drupal core modules do too (see book_type_is_allowed()).

It is possible to use a single Drupal variable to contain different settings used by a module into an array. With the form #tree attribute is still possible to use system_settings_form() to save the array into a Drupal variable without writing any additional code. Serializing the de-serializing the code is automatically done by the Drupal core functions that handle Drupal variables (see  the code of variable_set()).

The question is then: when should a single Drupal variable be used to contain different settings? I would use a single variable for settings that are used by a function, or a group of functions; if the array contains values used by (for example) 10 different functions, but those functions access a single value (or a couple of values) from that array, then I would not use a single persistent variable for the settings.