Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Single file oriented for different usage

by dragonchild (Archbishop)
on Feb 26, 2008 at 17:04 UTC ( [id://670326]=note: print w/replies, xml ) Need Help??


in reply to Single file oriented for different usage

If using a single file is causing you headaches, then don't use a single file.

In my projects, we solve that problem by having two config files. One is the main one, one has $USER-specific overrides. So, when you run the app, the main config file is loaded, then, if one exists, the $USER-specific one is loaded and overrides anything it needs to override.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re: Single file oriented for different usage

Replies are listed 'Best First'.
Re^2: Single file oriented for different usage
by arbingersys (Pilgrim) on Feb 26, 2008 at 17:25 UTC

    Thanks. That would certainly work in the case where the parameters are established, and they won't change much. (Like if I ever near stable, non-beta releases.) But while it's under active development and I still might be experimenting, I can't guarantee that parameters, parameter names, etc, won't shift around, be removed, or altered in a way that would break a user config file. Any suggestions in this case?

    A blog among millions.
      You couldn't guarantee that anyways, even in prod. Just look at how often parameter names change in Oracle, let alone MySQL or Apache. Just get it done. :-)

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

        Right. So multiple copies of Config.pm then... ?

        A blog among millions.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://670326]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-25 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found