Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Single file oriented for different usage

by apl (Monsignor)
on Feb 26, 2008 at 17:12 UTC ( [id://670328]=note: print w/replies, xml ) Need Help??


in reply to Single file oriented for different usage

How about a run-string parameter with one of three possible values ( 'EXP', 'DEMO', 'LIVE'). Your single configuration file could then have EXP_DB_HOST, DEMO_DB_HOST and LIVE_DB_HOST as opposed to DB_HOST as a field.

Common fields would remain consistant, but you'd have to add a little intellegence when getting a detail that can vary.

  • 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 18:29 UTC

    (It begins to look a little like #ifdef/#include, doesn't it? :)

    My mind sort of wandered in this direction, and it would work for some of the problem, definitely. But I wouldn't want the username/passwords for the online demo in the source, obviously.

    I've realized that my initial query was a bit unclear, and what I'm really asking is whether a single file could be diced up while 'Make'-ing a target to include the appropriate differences, i.e. EXP, LIVE, DEMO. Sorry about that.

    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://670328]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-25 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found