in reply to backup storage for variables
What I'll do sometimes is put the default config file after __DATA__ (since I usually do this in a module), and instantiate the Config object (e.g., Config::Auto or Config::IniFiles) on both the user config file and on DATA, and every time someone queries for a parm, I first check the user config file, with a fallback to the hard-coded config. It does use up more memory/CPU time to do it this way vs using a hash, but it does get me precisely the same interface to both user- and hardcoded-configs.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: backup storage for variables
by Anonymous Monk on Jan 27, 2005 at 15:55 UTC | |
by Tanktalus (Canon) on Jan 27, 2005 at 16:21 UTC |